diff --git a/client/nginx.conf b/client/nginx.conf index f45aae1..9d9f886 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -19,6 +19,7 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Authorization $http_authorization; proxy_cache_bypass $http_upgrade; proxy_connect_timeout 10s; @@ -33,6 +34,7 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; proxy_cache_bypass $http_upgrade; proxy_connect_timeout 10s; proxy_send_timeout 650s; diff --git a/install-custom.sh b/install-custom.sh index 2d499a6..807feba 100644 --- a/install-custom.sh +++ b/install-custom.sh @@ -496,6 +496,7 @@ server { proxy_set_header Host \$http_host; 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_connect_timeout 10s; proxy_send_timeout 650s; proxy_read_timeout 650s; @@ -505,6 +506,7 @@ server { proxy_set_header Host \$http_host; 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_connect_timeout 10s; proxy_send_timeout 650s; proxy_read_timeout 650s; @@ -597,6 +599,7 @@ server { proxy_set_header Upgrade \$http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host \$http_host; + proxy_set_header X-Forwarded-Proto \$scheme; proxy_cache_bypass \$http_upgrade; proxy_set_header X-Real-IP \$remote_addr; proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; @@ -610,6 +613,7 @@ server { proxy_set_header Upgrade \$http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host \$http_host; + proxy_set_header X-Forwarded-Proto \$scheme; proxy_cache_bypass \$http_upgrade; proxy_set_header X-Real-IP \$remote_addr; proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; diff --git a/update-custom.sh b/update-custom.sh index 8ce529c..9aeabb2 100644 --- a/update-custom.sh +++ b/update-custom.sh @@ -224,6 +224,7 @@ ensure_nginx_api_timeouts() { print line if ((in_api || in_bus) && line ~ /proxy_set_header[[:space:]]+X-Forwarded-For[[:space:]]+/ && injected == 0) { + print " proxy_set_header X-Forwarded-Proto $scheme;" print " proxy_connect_timeout 10s;" print " proxy_send_timeout 650s;" print " proxy_read_timeout 650s;" @@ -266,6 +267,7 @@ ensure_bus_location() { print " proxy_set_header Host $http_host;" print " proxy_set_header X-Real-IP $remote_addr;" print " proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;" + print " proxy_set_header X-Forwarded-Proto $scheme;" print " proxy_connect_timeout 10s;" print " proxy_send_timeout 650s;" print " proxy_read_timeout 650s;"