Skip to content

paths.base production build routing issue #8091

@inzanez

Description

@inzanez

Describe the problem

Hi all

I serve a Svelte application through a reverse proxy under a sub-path like http://my-site.com/sub/path. When forwarding the requests, the reverse proxy rewrites the path so that /sub/path gets removed, resulting in requets to the Svelte deployment as if it were hosted at the root.
To make this work, I set paths.base to /sub/path. Using the node adapter, it prepended that paths.base to every static asset URL so that it was correctly fetched.

After upgrading to the most recent version of @sveltejs/kit and @adapter/node things do not seem to work anymore. When setting the paths.base variable, it seems that the resulting node build expects me to hit the server with the routes ${paths.base}/actual-route. Which is not really how it used to work,...

Describe the proposed solution

Fix routing based on paths.base...

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions