code-server 4.0.0 behind nginx reports wrong port
See original GitHub issueUsing the following nginx configuration (fragment) in combination the SSL and code server reports port 80 in code-server instead of 443/https?
location / {
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
code-server 4.0.0 behind nginx reports wrong port · Issue #4607
Same problem with my setup. I'm running code-server via JupyterHub as part of a JupyterLab image with Traefik as a reverse proxy.
Read more >Usage - code-server v4.8.0 docs - Coder
Using Let's Encrypt with NGINX; Using a self-signed certificate. Port forwarding via SSH. We highly recommend using port forwarding via SSH to access...
Read more >How To Set Up the code-server Cloud IDE Platform on Ubuntu ...
your-domain with your desired domain, then save and close the file. In this file, you define that Nginx should listen to HTTP port...
Read more >Using reverse proxy to expose code-server to the internet
You can try using my nginx config, change app URL and app port if needed, put it in /etc/nginx/sites-available than use symlink to ......
Read more >Avoiding the Top 10 NGINX Configuration Mistakes
We help you avoid the 10 most common NGINX configuration errors, explaining the problems caused by each and how to fix them.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As a temporary solution just in case this helps anyone, I’ve just made sure that
X-Forwarded-Host
returned thehttps://<code-server-url>:443
(hardcoded the 443 port) and everything works perfectly.Ah…the headers appear to be lowercased so they do not match. Not sure if they always come that way or if Express lowercases them. 🤦
So I guess
forwarded
should work since we have it lowercase but not theX-
variants. But as mentioned next version will get rid of all this.