Add --abs-proxy-base-path for when code-server is not at the root (#6958)

This commit is contained in:
Rafael Ferreira
2024-08-26 21:19:55 +01:00
committed by GitHub
parent 39ce82a44d
commit 4a703893b0
6 changed files with 43 additions and 4 deletions

View File

@ -20,6 +20,7 @@
- [Proxying to a Vue app](#proxying-to-a-vue-app)
- [Proxying to an Angular app](#proxying-to-an-angular-app)
- [Proxying to a Svelte app](#proxying-to-a-svelte-app)
- [Prefixing `/absproxy/<port>` with a path](#prefixing-absproxyport-with-a-path)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier-ignore-end -->
@ -432,3 +433,12 @@ const config = {
3. Access app at `<code-server-root>/absproxy/5173/` e.g. `http://localhost:8080/absproxy/5173/
For additional context, see [this Github Issue](https://github.com/sveltejs/kit/issues/2958)
### Prefixing `/absproxy/<port>` with a path
This is a case where you need to serve an application via `absproxy` as explained above while serving `codeserver` itself from a path other than the root in your domain.
For example: `http://my-code-server.com/user/123/workspace/my-app`. To achieve this result:
1. Start code server with the switch `--abs-proxy-base-path=/user/123/workspace`
2. Follow one of the instructions above for your framework.