mirror of
https://github.com/linuxserver/docker-swag.git
synced 2026-10-22 20:56:48 +09:00
Update Nginx configuration to replace $http_host with $host$is_request_port$request_port for better compatibility
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
1 parent
6f68d40a7a
commit
2807f25ee0
2 files changed
+10
-5
No files matched your search
@@ -21,15 +21,15 @@ proxy_no_cache $cookie_session;
|
||||
# Proxy Header Settings
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Early-Data $ssl_early_data;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host; # NOTE: only use $host here, port is handled separately
|
||||
proxy_set_header Proxy "";
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host; # NOTE: only use $host here, port is handled separately
|
||||
proxy_set_header X-Forwarded-Method $request_method;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Forwarded-Port $request_port;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-Server $host; # NOTE: only use $host here, port is handled separately
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-Uri $request_uri;
|
||||
proxy_set_header X-Original-Method $request_method;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Version 2026/03/07 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample
|
||||
## Version 2026/10/20 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample
|
||||
|
||||
# redirect all traffic to https
|
||||
server {
|
||||
@@ -7,6 +7,11 @@ server {
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
|
||||
# NOTE FOR USERS: If your external HTTP and HTTPS ports are asymmetrical
|
||||
# (e.g., External 8443 maps to Nginx 443),
|
||||
# replace the return above this one and hardcode your external HTTPS port:
|
||||
# return 301 https://$host:8443$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user