Skip to content

Commit

Permalink
nginx proxy example: Use $host instead of $http_host
Browse files Browse the repository at this point in the history
Thanks for the suggestion @Glandos
CollaboraOnline#9902

Signed-off-by: Andras Timar <[email protected]>
Change-Id: Ief580e958d2b98cbff43c3256b4d8987c2f3c3cf
  • Loading branch information
timar committed Sep 11, 2024
1 parent 9f6782d commit cee77a8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions etc/nginx/coolwsd.conf
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
# static files
location ^~ /browser {
proxy_pass http://localhost:9980;
proxy_set_header Host $http_host;
proxy_set_header Host $host;
}

# WOPI discovery URL
location ^~ /hosting/discovery {
proxy_pass http://localhost:9980;
proxy_set_header Host $http_host;
proxy_set_header Host $host;
}

# Capabilities
location ^~ /hosting/capabilities {
proxy_pass http://localhost:9980;
proxy_set_header Host $http_host;
proxy_set_header Host $host;
}

# main websocket
location ~ ^/cool/(.*)/ws$ {
proxy_pass http://localhost:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_set_header Host $host;
proxy_read_timeout 36000s;
}

# download, presentation and image upload
# we accept 'lool' to be backward compatible
location ~ ^/(c|l)ool {
proxy_pass http://localhost:9980;
proxy_set_header Host $http_host;
proxy_set_header Host $host;
}

# Admin Console websocket
location ^~ /cool/adminws {
proxy_pass http://localhost:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_set_header Host $host;
proxy_read_timeout 36000s;
}

0 comments on commit cee77a8

Please sign in to comment.