Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Serving at a subpath is difficult due to a hardcoded base url #510

Open
spantaleev opened this issue Feb 26, 2023 · 0 comments
Open

Serving at a subpath is difficult due to a hardcoded base url #510

spantaleev opened this issue Feb 26, 2023 · 0 comments

Comments

@spantaleev
Copy link

Due to

<base href="/">

.. serving at a different subpath (e.g. DOMAIN/dimension/) means that the index page loads, but all resources are attempted to be loaded from the wrong place (DOMAIN/asset instead of DOMAIN/dimension/asset). To fix it up, one would need to override the base url.

For nginx, one could possibly use a sub_filter, but other reverse-proxies (e.g. Traefik) do not currently have an integrated middleware for arbitrary text replacements.


I suppose the easiest solution would be to make the docker entrypoint read some environment variable (e.g. BASE_URL) and then do a sed-replace in web/index.html before starting.

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

No branches or pull requests

1 participant