Closed snicoe closed 2 weeks ago
code-server requires websocket support so you have to enable it
useless!!!!
code-server requires websocket support so you have to enable it
websockets support is enabled,websocket 1006 is still reported, like @lauren12133
Same stuff here !!! "Websockets Support" option has no effect all :-(
@wbrione bro i solved this problem :) maybe help. Add “Custom Nginx Configuration", no other changes are needed.
location /
{
proxy_pass http://[YOUR_SERVER_IP]:9901;
proxy_set_header Host [YOUR_DOMAIN]:25052;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
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;
add_header X-Cache $upstream_cache_status;
}
change the [YOUR_SERVER_IP], [YOUR_DOMAIN] and server port to your own
@snicoe
So, i created a "custom location", but... same error... in fact, some errors are still very specific, like...
Unable to open 'workspace'
Unable to resolve resource vscode-remote://<my domain>/config/workspace
or
ENOPRO: No file system provider found for resource 'vscode-remote:/config/data/User/settings.json'
So... back in your tip... I believe that plus change the [SERVER_IP] and [DOMAIN], i need replace the ports of two first lines, right ?!
Ports: 9901 and 25052... i don't recognize this :flushed:
@wbrione yes ,you need replace the ports of two first lines
@wbrione bro i solved this problem :) maybe help. Add “Custom Nginx Configuration", no other changes are needed.
location / { proxy_pass http://[YOUR_SERVER_IP]:9901; proxy_set_header Host [YOUR_DOMAIN]:25052; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; 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; add_header X-Cache $upstream_cache_status; }
change the [YOUR_SERVER_IP], [YOUR_DOMAIN] and server port to your own
You save my life!
Issue is now considered stale. If you want to keep it open, please comment :+1:
my English is not good, please don't mind -_-lol I deployed the project on docker and successfully obtained the ssl certificate,the code-server is deployed on my homelab server. I proxy the code-server port through, when I access it with the domain, the code-server returns an error of "websocket 1006". By adding proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; establish websocket connection normally, I want to know the reason.