Added option to set allows and denies for locations (#133)

This commit is contained in:
Carl Bäckström 2019-08-05 20:20:12 +02:00 committed by Alessandro Fael Garcia
parent 487a2d0c07
commit b2fc8b5621
3 changed files with 18 additions and 0 deletions

View File

@ -469,6 +469,10 @@ nginx_http_template:
proxy_pass: http://backend proxy_pass: http://backend
#rewrite: /foo(.*) /$1 break #rewrite: /foo(.*) /$1 break
#proxy_pass_request_body: off #proxy_pass_request_body: off
#allows:
# - 192.168.1.0/24
#denies:
# - all
proxy_set_header: proxy_set_header:
header_host: header_host:
name: Host name: Host

View File

@ -281,6 +281,10 @@ nginx_http_template:
proxy_pass: http://backend proxy_pass: http://backend
#rewrite: /foo(.*) /$1 break #rewrite: /foo(.*) /$1 break
#proxy_pass_request_body: off #proxy_pass_request_body: off
#allows:
# - 192.168.1.0/24
#denies:
# - all
proxy_set_header: proxy_set_header:
header_host: header_host:
name: Host name: Host

View File

@ -195,6 +195,16 @@ server {
{% if item.value.reverse_proxy.locations[location].proxy_store_access is defined %} {% if item.value.reverse_proxy.locations[location].proxy_store_access is defined %}
proxy_store_access {{ item.value.reverse_proxy.locations[location].proxy_store_access }}; proxy_store_access {{ item.value.reverse_proxy.locations[location].proxy_store_access }};
{% endif %} {% endif %}
{% if item.value.reverse_proxy.locations[location].allows is defined %}
{% for allow in item.value.reverse_proxy.locations[location].allows %}
allow {{ allow }};
{% endfor %}
{% endif %}
{% if item.value.reverse_proxy.locations[location].denies is defined %}
{% for deny in item.value.reverse_proxy.locations[location].denies %}
deny {{ deny }};
{% endfor %}
{% endif %}
{% if item.value.reverse_proxy.locations[location].proxy_set_header is defined %} {% if item.value.reverse_proxy.locations[location].proxy_set_header is defined %}
{% for header in item.value.reverse_proxy.locations[location].proxy_set_header %} {% for header in item.value.reverse_proxy.locations[location].proxy_set_header %}
proxy_set_header {{ item.value.reverse_proxy.locations[location].proxy_set_header[header].name }} {{ item.value.reverse_proxy.locations[location].proxy_set_header[header].value }}; proxy_set_header {{ item.value.reverse_proxy.locations[location].proxy_set_header[header].name }} {{ item.value.reverse_proxy.locations[location].proxy_set_header[header].value }};