Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BaseURL / root path has changed with port forward in coder-server #7115

Unanswered
br-barrowkwan asked this question in General
Discussion options

I am sure I have missed a configuration but not sure which is it.
I am running coder in Kubernetes with nginx ingress. I created a workspace, start coder-server and run tomcat on port 8080 in coder terminal
code-server automatically create the port fowarding with a local address

https://coder.mydomain.com/@barrowk/coder-test.main/apps/code-server/proxy/8080/

when I access my app , eg
https://coder.mydomain.com/@barrowk/coder-test.main/apps/code-server/proxy/8080/test/helloworld

this works fine. however, all links inside this page has broken because it points to the coder server url.

eg
https://coder.mydomain.com/@barrowk/coder-test.main/apps/code-server/proxy/8080/image/abc.png

become

https://coder.mydomain.com/image/abc.png

the proxy part "@barrowk/coder-test.main/apps/code-server/proxy/8080" has removed by the port forwarding.

You must be logged in to vote

Replies: 1 comment

Comment options

I think you can make this work by:

  1. Using absproxy instead of proxy (absproxy does not rewrite the URL, so it is necessary for apps that do not work relatively).
  2. Passing --abs-proxy-base-path /@barrowk/coder-test.main/apps/code-server to code-server.

So, https://coder.mydomain.com/@barrowk/coder-test.main/apps/code-server/absproxy/8080/image/abc.png for example should work after that, I believe.

Unfortunately, the ports panel always uses proxy, not absproxy, so you have to manually type it in the URL. I think there is a feature request to allow choosing which to use from the ports panel.

https://github.com/coder/code-server/blob/main/docs/guide.md#prefixing-absproxyport-with-a-path

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /