Websocket support enabled for reverse proxy locations. (#97)
* Websocket support for reverse proxy locations.
This commit is contained in:
parent
3a66e10a17
commit
8db44bf979
@ -350,6 +350,7 @@ nginx_http_template:
|
||||
backend:
|
||||
location: /
|
||||
proxy_pass: http://backend
|
||||
websocket: false
|
||||
health_check_plus: false
|
||||
upstreams:
|
||||
upstream1:
|
||||
|
@ -181,6 +181,7 @@ nginx_http_template:
|
||||
backend:
|
||||
location: /
|
||||
proxy_pass: http://backend
|
||||
websocket: false
|
||||
health_check_plus: false
|
||||
upstreams:
|
||||
upstream1:
|
||||
|
@ -41,6 +41,10 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
{% 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 %}
|
||||
}
|
||||
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user