Closed
Description
Deploying code-server to a nested URL such as /code
will result in assets being requested from /
, when they should be /code
.
The HTML source code references root-level assets:
<script type="text/javascript" src="main.js"></script>
We should, instead, allow users to specify if they are hosting on a nested URL like /code
, thus appending the host to the HTML:
./code-server --host=0.0.0.0/code
<script type="text/javascript" src="/code/main.js"></script>
Reproduction Steps
- Deploy to a URL like
/code
, or/johhny/codes
- Start code server
- Visit the URL, and observe that assets are not requested from the desired URL (
code
), but instead, are requested from the root/
URL