Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Extend Forwarded header, if present #25827

Merged
merged 1 commit into from Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -19,6 +19,11 @@ map \$http_x_forwarded_host \$origin_host {
'' \$host;
}

map \$http_forwarded \$final_forwarded {
default '\$http_forwarded, host=\$host;proto=\$scheme';
'' '';
}

# redirect log to stdout for supervisor to capture
access_log /dev/stdout;

Expand Down Expand Up @@ -67,7 +72,8 @@ server {
}

proxy_set_header X-Forwarded-Proto \$origin_scheme;
proxy_set_header X-Forwarded-Host \$origin_host;
proxy_set_header X-Forwarded-Host \$origin_host;
proxy_set_header Forwarded \$final_forwarded;

location / {
try_files /loading.html \$uri /index.html =404;
Expand Down
Expand Up @@ -25,6 +25,11 @@ map \$http_x_forwarded_host \$origin_host {
'' \$host;
}

map \$http_forwarded \$final_forwarded {
default '\$http_forwarded, host=\$host;proto=\$scheme';
'' '';
}

# redirect log to stdout for supervisor to capture
access_log /dev/stdout;

Expand Down Expand Up @@ -70,6 +75,7 @@ server {

proxy_set_header X-Forwarded-Proto \$origin_scheme;
proxy_set_header X-Forwarded-Host \$origin_host;
proxy_set_header Forwarded \$final_forwarded;

client_max_body_size 150m;

Expand Down