Add websockets configuration back to http template (#140)
* Add websockets config back to template * Implement #111 Changes for proxy_http_version and made it configurable. * Moved out of the websockets block and make it independently configurable
This commit is contained in:
parent
c730f522f1
commit
43fdafe1b1
@ -493,6 +493,7 @@ nginx_http_template:
|
|||||||
proxy_ignore_headers:
|
proxy_ignore_headers:
|
||||||
- Vary
|
- Vary
|
||||||
- Cache-Control
|
- Cache-Control
|
||||||
|
proxy_http_version: 1.0
|
||||||
websocket: false
|
websocket: false
|
||||||
auth_basic: null
|
auth_basic: null
|
||||||
auth_basic_user_file: null
|
auth_basic_user_file: null
|
||||||
|
@ -305,6 +305,7 @@ nginx_http_template:
|
|||||||
proxy_ignore_headers:
|
proxy_ignore_headers:
|
||||||
- Vary
|
- Vary
|
||||||
- Cache-Control
|
- Cache-Control
|
||||||
|
proxy_http_version: 1.0
|
||||||
websocket: false
|
websocket: false
|
||||||
auth_basic: null
|
auth_basic: null
|
||||||
auth_basic_user_file: null
|
auth_basic_user_file: null
|
||||||
|
@ -161,6 +161,13 @@ server {
|
|||||||
{% 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 }};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if item.value.reverse_proxy.locations[location].proxy_http_version is defined %}
|
||||||
|
proxy_http_version {{ item.value.reverse_proxy.locations[location].proxy_http_version }};
|
||||||
|
{% endif %}
|
||||||
|
{% if item.value.reverse_proxy.locations[location].websocket is defined and item.value.reverse_proxy.locations[location].websocket %}
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.value.reverse_proxy.locations[location].try_files is defined %}
|
{% if item.value.reverse_proxy.locations[location].try_files is defined %}
|
||||||
try_files {{ item.value.reverse_proxy.locations[location].try_files }};
|
try_files {{ item.value.reverse_proxy.locations[location].try_files }};
|
||||||
|
Loading…
Reference in New Issue
Block a user