Closed matthew-st closed 1 month ago
Does the problem happen in Safari only or any browser?
Does the problem happen in Safari only or any browser?
I tested it in Google Chrome, seems to happen there as well.
@matthew-st It is recommended to access https/wss over port 443.
Can you please share your nginx configuration?
My nginx configuration is as seen below:
server {
listen 8080 default_server ssl;
server_name [domain name];
ssl_certificate [cert location];
ssl_certificate_key [cert key location];
include nginxconfig.io/security.conf;
location / {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-Host $http_host;
proxy_connect_timeout 60;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
include nginxconfig.io/general.conf;
}
Sorry for the delay, got busy with stuff outside of this.
This is may be related to one or both of the following point:
8080
8080/tcp
is a common alternative HTTP (not HTTPS) portI have no idea what nginxconfig.io/general.conf
and nginxconfig.io/security.conf
include in addition.
@matthew-st This has nothing to do with code-server, as my reference deployment at https://demo.jupyter.b-data.ch [which uses Traefik for TLS Termination][^1] works perfectly fine.
[^1]: Traefik: TLS termination, proxy no. 1; JupyterHub: proxy no. 2; JupyterLab (Jupyter Server Proxy): proxy no. 3; code-server: web app (proxy no. 4)
@matthew-st This may be it: Your configuration is missing proxy_set_header X-Forwarded-Proto $scheme;
@matthew-st This has nothing to do with code-server, as my reference deployment at https://demo.jupyter.b-data.ch [which uses Traefik for TLS Termination]1 works perfectly fine.
Footnotes
- Traefik: TLS termination, proxy no. 1; JupyterHub: proxy no. 2; JupyterLab (Jupyter Server Proxy): proxy no. 3; code-server: web app (proxy no. 4) ↩
Thought I'd ask just in case anyone knew.
@matthew-st This may be it: Your configuration is missing
proxy_set_header X-Forwarded-Proto $scheme;
That seems to have fixed it for me, thank you.
Is there an existing issue for this?
OS/Web Information
code-server --version
: 4.89.1Steps to Reproduce
Expected
Syntax highlighting should work the same as it does without Nginx.
Actual
Syntax highlighting is very basic when running behind Nginx, leaving most of the code white.
Logs
Screenshot/Video
Accessing through Nginx
Accessing without Nginx
Does this bug reproduce in native VS Code?
No, this works as expected in native VS Code
Does this bug reproduce in GitHub Codespaces?
I did not test GitHub Codespaces
Are you accessing code-server over a secure context?
Notes
When accessing without Nginx, I am accessing over an insecure context. Nginx is being used to add SSL to the connection.