Skip to content

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

Description

@yiays

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/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions