Skip to content

Commit

Permalink
Fix template error
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Aug 21, 2017
1 parent 827d852 commit 884b388
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ stream {

{{ if isLocationAllowed $location }}
{{ if gt (len $location.Whitelist.CIDR) 0 }}
if ({{ buildDenyVariable (print .Hostname "_" $path) }}) {
if ({{ buildDenyVariable (print $server.Hostname "_" $path) }}) {
return 403;
}
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions controllers/nginx/test/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"sslRedirect": true
},
"whitelist": {
"cidr": []
"cidr": ["1.1.1.1"]
},
"proxy": {
"conectTimeout": 5,
Expand Down Expand Up @@ -146,7 +146,7 @@
"sslRedirect": false
},
"whitelist": {
"cidr": null
"cidr": ["1.1.1.1"]
},
"proxy": {
"conectTimeout": 5,
Expand Down

0 comments on commit 884b388

Please sign in to comment.