Skip to content

Commit

Permalink
Merge pull request #1204 from aledbf/fix-template
Browse files Browse the repository at this point in the history
Fix template error
  • Loading branch information
aledbf authored Aug 21, 2017
2 parents 827d852 + 884b388 commit a5eac35
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 a5eac35

Please sign in to comment.