Use $proxy_add_x_forwarded_for for custom locations

Use $proxy_add_x_forwarded_for when setting X-Forwarded-For in custom locations to match how it is set for default location
This commit is contained in:
Sebastian Gustavsson 2025-02-06 04:05:51 +01:00 committed by GitHub
parent 34c703f8b4
commit 6834d1b101
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};