Added option to set allows and denies for locations (#133)
This commit is contained in:
parent
487a2d0c07
commit
b2fc8b5621
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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 }};
|
||||||
|
Loading…
Reference in New Issue
Block a user