Proxy cookie path (#150)

* Add proxy_cookie_path directive to rewrite the cookie path

* delete unnecessary spacing
This commit is contained in:
Philip Henning 2019-07-15 18:58:35 +02:00 committed by Alessandro Fael Garcia
parent a8dfb5b7df
commit 421882389d
4 changed files with 12 additions and 0 deletions

View File

@ -506,6 +506,9 @@ nginx_http_template:
proxy_ignore_headers:
- Vary
- Cache-Control
proxy_cookie_path:
path: /web/
replacement: /
proxy_buffering: false
proxy_http_version: 1.0
websocket: false

View File

@ -318,6 +318,9 @@ nginx_http_template:
proxy_ignore_headers:
- Vary
- Cache-Control
proxy_cookie_path:
path: /web/
replacement: /
proxy_buffering: false
proxy_http_version: 1.0
websocket: false

View File

@ -254,6 +254,9 @@ server {
{% if item.value.reverse_proxy.locations[location].proxy_ignore_headers is defined %}
proxy_ignore_headers {{ item.value.reverse_proxy.locations[location].proxy_ignore_headers | join(" ") }};
{% endif %}
{% if item.value.reverse_proxy.locations[location].proxy_cookie_path is defined %}
proxy_cookie_path {{ item.value.reverse_proxy.locations[location].proxy_cookie_path.path }} {{ item.value.reverse_proxy.locations[location].proxy_cookie_path.replacement }};
{% endif %}
{% if item.value.reverse_proxy.locations[location].proxy_buffering is defined %}
proxy_buffering {{ item.value.reverse_proxy.locations[location].proxy_buffering | ternary("on", "off") }};
{% endif %}

View File

@ -119,6 +119,9 @@
header_x_forwarded_proto:
name: X-Forwarded-Proto
value: $scheme
proxy_cookie_path:
path: /web/
replacement: /
upstreams:
frontend_upstream:
name: frontend_servers