1
0
mirror of synced 2024-11-12 00:40:50 +01:00

add X-Forwarded-For to nginx config

This commit is contained in:
Kevin Trocolli 2023-03-12 01:47:59 -05:00
parent 18a95f5213
commit a97509bb43

View File

@ -4,6 +4,8 @@ server {
server_name naominet.jp;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
proxy_pass http://localhost:8000/;
}
}
@ -14,6 +16,8 @@ server {
server_name your.hostname.here;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
proxy_pass http://localhost:8080/;
}
}
@ -75,6 +79,8 @@ server {
ssl_prefer_server_ciphers off;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
proxy_pass http://localhost:8080/;
}
}
@ -95,6 +101,8 @@ server {
ssl_prefer_server_ciphers off;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
proxy_pass http://localhost:8080/SDBT/104/;
}
}
@ -131,6 +139,8 @@ server {
add_header Strict-Transport-Security "max-age=63072000" always;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
proxy_pass http://localhost:8090/;
}
}