Skip to content

Commit

Permalink
doc: Added nginx web socket configuration
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
FSeidinger committed Dec 30, 2024
1 parent 3298dc8 commit 8433148
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions installation/reverse-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 8433148

Please sign in to comment.