Fix full XFF with PROXY
This commit is contained in:
parent
5d69070543
commit
e56fc7245f
1 changed files with 5 additions and 0 deletions
|
@ -214,8 +214,13 @@ http {
|
|||
# We can't use $proxy_add_x_forwarded_for because the realip module
|
||||
# replaces the remote_addr too soon
|
||||
map $http_x_forwarded_for $full_x_forwarded_for {
|
||||
{{ if $all.Cfg.UseProxyProtocol }}
|
||||
default "$http_x_forwarded_for, $proxy_protocol_addr";
|
||||
'' "$proxy_protocol_addr";
|
||||
{{ else }}
|
||||
default "$http_x_forwarded_for, $realip_remote_addr";
|
||||
'' "$realip_remote_addr";
|
||||
{{ end}}
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue