This commit is contained in:
Bob Violier 2017-03-03 12:02:54 +00:00 committed by GitHub
commit 5d0ea226b7

View file

@ -259,6 +259,12 @@ http {
{{ range $ip := $location.Whitelist.CIDR }} {{ range $ip := $location.Whitelist.CIDR }}
allow {{ $ip }};{{ end }} allow {{ $ip }};{{ end }}
deny all; deny all;
{{ else }}
{{ if gt (len $cfg.WhitelistSourceRange) 0 }}
{{ range $ip := $cfg.WhitelistSourceRange}}
allow {{ $ip }};{{ end }}
deny all;
{{ end }}
{{ end }} {{ end }}
port_in_redirect {{ if $location.UsePortInRedirects }}on{{ else }}off{{ end }}; port_in_redirect {{ if $location.UsePortInRedirects }}on{{ else }}off{{ end }};