propagate X-Forwarded-Proto header

This commit is contained in:
Pau Capó 2024-06-22 19:15:43 +02:00 committed by GitHub
parent 81b7661849
commit 43e2d1d073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,13 @@
add_header X-Served-By $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
set $origin_scheme $scheme;
if ($http_x_forwarded_proto != "") {
set $origin_scheme $http_x_forwarded_proto;
}
proxy_set_header X-Forwarded-Scheme $origin_scheme;
proxy_set_header X-Forwarded-Proto $origin_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass $forward_scheme://$server:$port$request_uri;