docs/reverse-proxy: use standard map, correct X-Forwarded-Proto variable for nginx (#1790)

This commit is contained in:
Sandro 2024-03-14 22:56:55 +01:00 committed by GitHub
parent ef26f58085
commit 95004de5e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,8 +33,7 @@ The following example configuration can be used in your nginx setup, substitutin
```Nginx ```Nginx
map $http_upgrade $connection_upgrade { map $http_upgrade $connection_upgrade {
default keep-alive; default upgrade;
'websocket' upgrade;
'' close; '' close;
} }
@ -61,7 +60,7 @@ server {
proxy_buffering off; proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header X-Forwarded-Proto $scheme;
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always; add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
} }
} }