Fix template mappings
This commit is contained in:
parent
d73edb8176
commit
6ee2b726f8
2 changed files with 3 additions and 3 deletions
|
@ -706,5 +706,5 @@ func trustProxyProtocol(input interface{}) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
return conf.Cfg.RealClientFrom == "tcp-proxy" ||
|
return conf.Cfg.RealClientFrom == "tcp-proxy" ||
|
||||||
(conf.Cfg.RealClientFrom == "auto" && !conf.Cfg.UseProxyProtocol)
|
(conf.Cfg.RealClientFrom == "auto" && conf.Cfg.UseProxyProtocol)
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,7 @@ http {
|
||||||
'' close;
|
'' close;
|
||||||
}
|
}
|
||||||
|
|
||||||
{{ if (trustHTTPHeaders $cfg) }}
|
{{ if (trustHTTPHeaders $all) }}
|
||||||
# Trust HTTP X-Forwarded-* Headers, but use direct values if they're missing.
|
# Trust HTTP X-Forwarded-* Headers, but use direct values if they're missing.
|
||||||
map {{ buildForwardedFor $cfg.ForwardedForHeader }} $the_real_ip {
|
map {{ buildForwardedFor $cfg.ForwardedForHeader }} $the_real_ip {
|
||||||
# Get IP address from X-Forwarded-For HTTP header
|
# Get IP address from X-Forwarded-For HTTP header
|
||||||
|
|
Loading…
Reference in a new issue