Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now all UI urls are based of
/
, which make it impossible to run coder behind a reverse proxy under a subpath (e.g./coder/
), as can be seen here:Even though it seems from the documentation this should work: https://coder.com/docs/code-server/latest/guide#expose-code-server
Instead of Caddy, I am using Traefik, but this also has a strip prefix which I have configured:
I saw coder is being built with
vite
, which has an option to define a basepath: https://vitejs.dev/config/shared-options.html#baseOthers have gone before me on StackOverflow, and found out that the default is
/
(as described in vite docs) causing these root paths, and in order to make it relative this needs to be./
: https://stackoverflow.com/questions/69744253/vite-build-always-using-static-paths/69746868#comment133768566_69746868This PR configures the basepath so coder can run in any directory, whether it be root or subpath.