Add ip/cidr white list support
This commit is contained in:
parent
b395b714be
commit
e792e940b2
6 changed files with 187 additions and 0 deletions
|
|
@ -180,6 +180,12 @@ http {
|
|||
{{- range $location := $server.Locations }}
|
||||
{{ $path := buildLocation $location }}
|
||||
location {{ $path }} {
|
||||
{{ if gt (len $location.Whitelist.CIDR) 0 }}
|
||||
{{- range $ip := $location.Whitelist.CIDR }}
|
||||
allow {{ $ip }};{{ end }}
|
||||
deny all;
|
||||
{{ end -}}
|
||||
|
||||
{{ if (and $server.SSL $location.Redirect.SSLRedirect) -}}
|
||||
# enforce ssl on server side
|
||||
if ($scheme = http) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue