From 8433148395bbc15189d545dfa144000082f17cf2 Mon Sep 17 00:00:00 2001 From: Frank Seidinger Date: Mon, 30 Dec 2024 13:03:27 +0100 Subject: [PATCH] doc: Added nginx web socket configuration To get the nginx proxy working with web sockets, e.g. to use the new log viewer in the OH4 GUI, the proxy_http_version 1.1 and the connectiond upgrade headers were added to the nginx configuration Signed-off-by: Frank Seidinger --- installation/reverse-proxy.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/installation/reverse-proxy.md b/installation/reverse-proxy.md index 2e9200870d..3be5f8871e 100644 --- a/installation/reverse-proxy.md +++ b/installation/reverse-proxy.md @@ -39,6 +39,9 @@ server { listen 80; server_name mydomain_or_myip; + # Enable web sockets, e.g. used by the log viewver in the new OH4 GUI + proxy_http_version 1.1; + # Cross-Origin Resource Sharing add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Allow_Credentials' 'true' always; @@ -52,6 +55,8 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; proxy_read_timeout 3600; } }