Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code-server setup guide is incomplete #1692

Open
kralicky opened this issue Nov 11, 2024 · 0 comments
Open

Code-server setup guide is incomplete #1692

kralicky opened this issue Nov 11, 2024 · 0 comments

Comments

@kralicky
Copy link
Contributor

Page: https://www.pomerium.com/docs/guides/code-server

What's incorrect or missing

I had to make the following changes after completing the setup guide:

  1. edit the code-server config file to add trusted-origins and proxy-domain:
bind-addr: 0.0.0.0:8080 # this defaulted to 127.0.0.1
auth: none
cert: false
trusted-origins:
  - <route hostname>
proxy-domain: 
  - <route hostname>/proxy/{{port}}
  1. turned off 'preserve host header' in pomerium route config

Before making these changes, the code-server websockets would not connect, failing with a 403 error. Additionally, subdomain port forwarding is the default, but the zero-provisioned certs don't support this.

I think the trusted-origins setting is required to allow wss connections after we do tls termination.

The proxy-domain setting is not clearly documented, but it seems to both tell code-server the public URL it will be accessed from, as well as enable subpath port forwarding (based on the presence of {{port}} in the string). https://github.com/coder/code-server/blob/fc97e248c354be27a054c182669a6984dd73cd41/src/node/cli.ts#L604-L617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant