Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative URLs #51

Open
gjedeer opened this issue Oct 27, 2021 · 3 comments
Open

Use relative URLs #51

gjedeer opened this issue Oct 27, 2021 · 3 comments

Comments

@gjedeer
Copy link

gjedeer commented Oct 27, 2021

The scripts aren't loaded if I install it in a subdirectory. Please either remove the "/" from JS/CSS paths in index.html or add <base href>

@gjedeer
Copy link
Author

gjedeer commented Oct 27, 2021

I just executed the following in the docker container and visiting index2.html works okay and plays music - even though the code is in a subdirectory.

/var/www/html # sed -e 's#"/#"#g' <index.html >index2.html

The resulting index2.html file is:

<!DOCTYPE html><html lang="en"><head data-build="80a2f4b186594fb156a3e69906554ddc54e03930"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; connect-src *; img-src *; media-src *; manifest-src 'self'; style-src 'self' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-624gmqlO23N0g1Ru4tkjuaPEoL/hXP4w7tUqel4WM98=' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-5uOIRR03mYcVoiexgzGGALQ0p1Babe2XxbeIl9t1UpA=' 'sha256-lM8P08IzH0mbT5Tvlm1F5BY3h0gPsb0qNpnZW9YHc7A='; script-src 'self'; base-uri 'self';"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000"><link rel="icon" href="icon.svg"><link rel="manifest" href="manifest.webmanifest"><script src="env.js"></script><title>Airsonic (refix)</title><link href="css/app.193c0949.css" rel="preload" as="style"><link href="css/chunk-vendors.66cdc8be.css" rel="preload" as="style"><link href="js/app.ac9269bb.js" rel="preload" as="script"><link href="js/chunk-vendors.7e50d4ad.js" rel="preload" as="script"><link href="css/chunk-vendors.66cdc8be.css" rel="stylesheet"><link href="css/app.193c0949.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but this application doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.7e50d4ad.js"></script><script src="js/app.ac9269bb.js"></script></body></html>

@gjedeer
Copy link
Author

gjedeer commented Oct 27, 2021

It looks like the pseudo-URLs generated with the History API would need some adjustment too, as they're generated in a root directory of the server.

@tamland
Copy link
Owner

tamland commented Oct 27, 2021

You will need to build the application with the base path to make this fully work. See #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants