Fix dynamic variable name
This commit is contained in:
parent
32f24380ec
commit
b70e9ca078
3 changed files with 33 additions and 2 deletions
|
|
@ -245,7 +245,7 @@ http {
|
|||
|
||||
{{ if isLocationAllowed $location }}
|
||||
{{ if gt (len $location.Whitelist.CIDR) 0 }}
|
||||
geo $the_real_ip $deny_{{ $server.Hostname }}_{{ $path }} {
|
||||
geo $the_real_ip {{ buildDenyVariable (print $server.Hostname "_" $path) }} {
|
||||
default 1;
|
||||
|
||||
{{ range $ip := $location.Whitelist.CIDR }}
|
||||
|
|
@ -337,7 +337,7 @@ http {
|
|||
|
||||
{{ if isLocationAllowed $location }}
|
||||
{{ if gt (len $location.Whitelist.CIDR) 0 }}
|
||||
if ($deny_{{ $server.Hostname }}_{{ $path }}) {
|
||||
if ({{ buildDenyVariable (print $server.Hostname "_" $path) }}) {
|
||||
return 403;
|
||||
}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue