Replies: 1 comment 1 reply
-
Is there a very simple reproduction for this issue? Ideally only using code-server. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I noticed that base-path was removed from the project years ago, this caused some issues in a deployment I did today.
Because of some restrictions, I had to use a reverse proxy chain like this:
WAN -> Nginx -> oauth2-proxy -> code-server
resulting in 404 errors as the root of code-server wasn't accessible due to the base path in place at the Nginx layer, and oauth2-proxy doesn't support rewrites at its layer to remove the base path before forwarding it onto code-server.
Because of the oauth2-proxy layer, I was unable to use rewrites in nginx to fix the request URI for code-server, as then oauth2-proxy would redirect to the wrong pages.
In the end I fixed with the following topology:
WAN -> Nginx -> oauth2-proxy -> Nginx -> code-server
The extra proxy step with Nginx is the only thing I found that could fix this, but it's undesirable because it adds extra complexity and an extra point of failure from a security point of view.
I have secured this second step by denying any non-localhost connections to the second Nginx step, hopefully preventing people from bypassing the oauth2-proxy layer by changing the Host header manually,
But this whole issue could be avoided if there was just an option to change the base route for code-server.
I exhausted every other configuration option and command line argument in nginx, oauth2-proxy, and code-server before writing this. Is this a feasible addition or am I just missing some better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions