Skip to content

Commit a5eac35

Browse files
authored
Merge pull request #1204 from aledbf/fix-template
Fix template error
2 parents 827d852 + 884b388 commit a5eac35

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ stream {
573573

574574
{{ if isLocationAllowed $location }}
575575
{{ if gt (len $location.Whitelist.CIDR) 0 }}
576-
if ({{ buildDenyVariable (print .Hostname "_" $path) }}) {
576+
if ({{ buildDenyVariable (print $server.Hostname "_" $path) }}) {
577577
return 403;
578578
}
579579
{{ end }}

controllers/nginx/test/data/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"sslRedirect": true
9797
},
9898
"whitelist": {
99-
"cidr": []
99+
"cidr": ["1.1.1.1"]
100100
},
101101
"proxy": {
102102
"conectTimeout": 5,
@@ -146,7 +146,7 @@
146146
"sslRedirect": false
147147
},
148148
"whitelist": {
149-
"cidr": null
149+
"cidr": ["1.1.1.1"]
150150
},
151151
"proxy": {
152152
"conectTimeout": 5,

0 commit comments

Comments
 (0)