Skip to content
Snippets Groups Projects
Commit 20b83357 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Optionally allow HTTP Upgrade in proxy locations

parent 12bd5af8
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,13 @@
{% endif %}
{# 1.1 and empty Connection to enable keepalive #}
proxy_http_version "{{location.proxy_http_version|default('1.1')}}";
{% if location.allow_upgrade|default(false) %}
{# Upgrade allows usage of websockets #}
proxy_set_header Upgrade "$http_upgrade";
proxy_set_header Connection "$connection_upgrade";
{% else %}
proxy_set_header Connection "";
{% endif %}
{% if location.proxy_headers is defined %}
{% for key, value in location.proxy_headers.items() %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment