From db9f6784772d312743199b1f18aafd8c540bd0e6 Mon Sep 17 00:00:00 2001 From: liuxhit <23427350+liuxhit@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:41:35 -0500 Subject: [PATCH] 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) --- docs/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide.md b/docs/guide.md index 05af726c6..5bf2fc9da 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -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;