Fix template mappings
This commit is contained in:
parent
d2d8f0463f
commit
08a6cfea23
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
|
||||||
|
@ -391,7 +391,7 @@ http {
|
||||||
|
|
||||||
{{ template "CUSTOM_ERRORS" $all }}
|
{{ template "CUSTOM_ERRORS" $all }}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{ if $server.Alias }}
|
{{ if $server.Alias }}
|
||||||
server {
|
server {
|
||||||
server_name {{ $server.Alias }};
|
server_name {{ $server.Alias }};
|
||||||
|
|
Loading…
Reference in a new issue