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

urlPrefix: "./" or "./static/" cause serveStatic to not serve at any url #305

Open
yiays opened this issue Jun 23, 2020 · 0 comments
Open

Comments

@yiays
Copy link

yiays commented Jun 23, 2020

As far as I can tell, no static URLs are valid or reachable if urlPrefix begins with a .. Though it might have something to do with my use case;

I'm writing my website in an environment where storing the website on the root is impossible, but express thinks it's serving the root. Eg. localhost:80/express/ is translated to localhost:3000/ before the express server sees it. This means the default behaviour of pointing to static at /static/ is impossible. I need to host static at localhost:3000/static/ while telling the browser to fetch static at localhost:80/express/static/.

Setting the urlPrefix to "./static" should fix this, but it doesn't. Nothing is served at localhost:3000/static/.

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

1 participant