Update default nginx config in guide.md (#6471)

update nginx config to avoid wss error when expose code-server using a custom domain and a custom port via nginx.

see also: 
[issue of code-server](https://github.com/coder/code-server/issues/4443)
[different between `$host` and `$http_host`](https://stackoverflow.com/a/76875724)
This commit is contained in:
liuxhit 2023-10-04 13:41:35 -05:00 committed by GitHub
parent c095c26dbc
commit db9f678477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ At this point, you should be able to access code-server via
location / {
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;