From 5e4b47e1a0f155fdf33cc9281b17b18b7244d2ac Mon Sep 17 00:00:00 2001 From: liuxhit <23427350+liuxhit@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:35:00 -0500 Subject: [PATCH] Update default nginx config in guide.md 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 05af726c69fd..5bf2fc9dac68 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;