my_webapp_ynh icon indicating copy to clipboard operation
my_webapp_ynh copied to clipboard

problem with html relative path using '../' and application configured with a subpath

Open leonarf opened this issue 7 months ago • 0 comments

Describe the bug

I have installed my_webapp on a domain ('https://lebasic.nohost.me') with a subpath ('/parcel/') and my website contains some HTML script tag containing '../' such as "

The bug is that it seems the website is looking for these assets at the path "https://lebasic.nohost.me/assets/js/range.js" instead of "https://lebasic.nohost.me/parcel/../assets/js/range.js"

I don't know if it's possible to make it work with nginx (and to include the change to the web_app code), or if I have to change the source code?

Context

  • Hardware: VPS at OVH
  • YunoHost version: 11.2.5
  • I have access to my server: Through SSH | through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
    • If yes, please explain: My website source code is in 2 separate folders that are in same folder as the 'www' folder expected by the application, one which is a symbolic link to the expected 'www' folder. Such as :
root@lebasic:/var/www/my_webapp# ls -l /var/www/my_webapp/
total 8
drwxr-xr-x 3 my_webapp my_webapp 4096 Nov 21 14:09 partials
drwxr-xr-x 5 my_webapp my_webapp 4096 Nov 21 14:09 partials-pages
lrwxrwxrwx 1 root      root        14 Nov 21 21:24 www -> partials-pages
  • Using, or trying to install package version/branch: 1.0~ynh15

Steps to reproduce

  1. Install the app
  2. Configure a subfolder
  3. Write some HTML code that include a script file that is in parent folder, such as

Logs

My website is accessible at https://lebasic.nohost.me/parcel/

leonarf avatar Nov 27 '23 17:11 leonarf