Add support for multiple rewrite directives as per nginx conf (#176)
This commit is contained in:
parent
41aeda300d
commit
7785babce1
@ -490,7 +490,8 @@ nginx_http_template:
|
||||
#always: false
|
||||
proxy_connect_timeout: null
|
||||
proxy_pass: http://backend
|
||||
#rewrite: /foo(.*) /$1 break
|
||||
#rewrites:
|
||||
# - /foo(.*) /$1 break
|
||||
#proxy_pass_request_body: off
|
||||
#allows:
|
||||
# - 192.168.1.0/24
|
||||
|
@ -304,7 +304,8 @@ nginx_http_template:
|
||||
#always: false
|
||||
proxy_connect_timeout: null
|
||||
proxy_pass: http://backend
|
||||
#rewrite: /foo(.*) /$1 break
|
||||
#rewrites:
|
||||
# - /foo(.*) /$1 break
|
||||
#proxy_pass_request_body: off
|
||||
#allows:
|
||||
# - 192.168.1.0/24
|
||||
|
@ -196,8 +196,10 @@ server {
|
||||
proxy_connect_timeout {{ item.value.reverse_proxy.locations[location].proxy_connect_timeout }};
|
||||
{% endif %}
|
||||
proxy_pass {{ item.value.reverse_proxy.locations[location].proxy_pass }};
|
||||
{% if item.value.reverse_proxy.locations[location].rewrite is defined %}
|
||||
rewrite {{ item.value.reverse_proxy.locations[location].rewrite }};
|
||||
{% if item.value.reverse_proxy.locations[location].rewrites is defined %}
|
||||
{% for rewrite in item.value.reverse_proxy.locations[location].rewrites %}
|
||||
rewrite {{ rewrite }};
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if item.value.reverse_proxy.locations[location].proxy_read_timeout is defined and item.value.reverse_proxy.locations[location].proxy_read_timeout %}
|
||||
proxy_read_timeout {{ item.value.reverse_proxy.locations[location].proxy_read_timeout }};
|
||||
|
Loading…
Reference in New Issue
Block a user