2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-14 09:14:04 +00:00

fix: use remote_addr instead of user-defined header ip

$proxy_add_x_forwarded_for sets the user defined ip in the request.
changing it to $remote_addr ensures that nginx sets the remote ip
itself, disregarding user-specified ip from the request.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai 2020-06-11 18:30:00 +05:30
parent 5e0de6f26b
commit a6bb58717d
No known key found for this signature in database
GPG Key ID: 75507BE256F40CED

View File

@ -85,7 +85,7 @@ server {
} }
location @webserver { location @webserver {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frappe-Site-Name {{ site_name }}; proxy_set_header X-Frappe-Site-Name {{ site_name }};
proxy_set_header Host $host; proxy_set_header Host $host;