Add enable-real-ip

This commit is contained in:
David Schwartz 2020-07-13 13:45:01 -04:00
parent 6982d72c40
commit d52141c2b9
4 changed files with 123 additions and 1 deletions

View file

@ -119,7 +119,7 @@ http {
{{/* Enable the real_ip module only if we use either X-Forwarded headers or Proxy Protocol. */}}
{{/* we use the value of the real IP for the geo_ip module */}}
{{ if or $cfg.UseForwardedHeaders $cfg.UseProxyProtocol }}
{{ if or (or $cfg.UseForwardedHeaders $cfg.UseProxyProtocol) $cfg.EnableRealIp }}
{{ if $cfg.UseProxyProtocol }}
real_ip_header proxy_protocol;
{{ else }}