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" ||
|
||||
(conf.Cfg.RealClientFrom == "auto" && !conf.Cfg.UseProxyProtocol)
|
||||
(conf.Cfg.RealClientFrom == "auto" && conf.Cfg.UseProxyProtocol)
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ http {
|
|||
'' close;
|
||||
}
|
||||
|
||||
{{ if (trustHTTPHeaders $cfg) }}
|
||||
{{ if (trustHTTPHeaders $all) }}
|
||||
# Trust HTTP X-Forwarded-* Headers, but use direct values if they're missing.
|
||||
map {{ buildForwardedFor $cfg.ForwardedForHeader }} $the_real_ip {
|
||||
# Get IP address from X-Forwarded-For HTTP header
|
||||
|
@ -391,7 +391,7 @@ http {
|
|||
|
||||
{{ template "CUSTOM_ERRORS" $all }}
|
||||
}
|
||||
|
||||
|
||||
{{ if $server.Alias }}
|
||||
server {
|
||||
server_name {{ $server.Alias }};
|
||||
|
|
Loading…
Reference in a new issue