chore(nginx): pass x-forward-for
Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com>
This commit is contained in:
parent
c43ed20034
commit
13f012ffde
1 changed files with 10 additions and 0 deletions
|
|
@ -37,6 +37,9 @@ data:
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-Forwarded-For $real_ip;
|
||||||
|
proxy_set_header X-Forwarded-Host $real_ip;
|
||||||
|
proxy_set_header X-Real-IP $real_ip;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_pass http://http-openreplay.app.svc.cluster.local;
|
proxy_pass http://http-openreplay.app.svc.cluster.local;
|
||||||
}
|
}
|
||||||
|
|
@ -104,6 +107,13 @@ data:
|
||||||
;
|
;
|
||||||
|
|
||||||
sites.conf: |-
|
sites.conf: |-
|
||||||
|
# Need real ip address for flags in replay.
|
||||||
|
# Some LBs will forward real ips as x-forwarded-for
|
||||||
|
# So making that as priority
|
||||||
|
map $http_x_forwarded_for $real_ip {
|
||||||
|
~^(\d+\.\d+\.\d+\.\d+) $1;
|
||||||
|
default $remote_addr;
|
||||||
|
}
|
||||||
map $http_upgrade $connection_upgrade {
|
map $http_upgrade $connection_upgrade {
|
||||||
default upgrade;
|
default upgrade;
|
||||||
'' close;
|
'' close;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue