Attempt to support WebSocket redirects
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
This commit is contained in:
@@ -58,6 +58,12 @@ MDomain {{ item.fqdn }}
|
|||||||
ProxyPassReverse "/" "{{ item.proxy }}"
|
ProxyPassReverse "/" "{{ item.proxy }}"
|
||||||
ProxyTimeout 300
|
ProxyTimeout 300
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.rewrite is defined %}
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||||
|
RewriteCond %{HTTP:Connection} upgrade [NC]
|
||||||
|
RewriteRule ^/?(.*) ws://{{ item.proxy }}/$1 [P,L]
|
||||||
|
{% endif %}
|
||||||
{% if item.redirect is defined %}
|
{% if item.redirect is defined %}
|
||||||
RedirectMatch "^(?!/\.well-known/).*" {{ item.redirect }}
|
RedirectMatch "^(?!/\.well-known/).*" {{ item.redirect }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ MDomain {{ item.fqdn }}
|
|||||||
ProxyPassReverse "/" "{{ item.proxy }}"
|
ProxyPassReverse "/" "{{ item.proxy }}"
|
||||||
ProxyTimeout 300
|
ProxyTimeout 300
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.rewrite is defined %}
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||||
|
RewriteCond %{HTTP:Connection} upgrade [NC]
|
||||||
|
RewriteRule ^/?(.*) ws://{{ item.proxy }}/$1 [P,L]
|
||||||
|
{% endif %}
|
||||||
{% if item.redirect is defined %}
|
{% if item.redirect is defined %}
|
||||||
RedirectMatch "^(?!/\.well-known/).*" {{ item.redirect }}
|
RedirectMatch "^(?!/\.well-known/).*" {{ item.redirect }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ MDomain {{ item.fqdn }}
|
|||||||
ProxyPassReverse "/" "{{ item.proxy }}"
|
ProxyPassReverse "/" "{{ item.proxy }}"
|
||||||
ProxyTimeout 300
|
ProxyTimeout 300
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.rewrite is defined %}
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||||
|
RewriteCond %{HTTP:Connection} upgrade [NC]
|
||||||
|
RewriteRule ^/?(.*) ws://{{ item.proxy }}/$1 [P,L]
|
||||||
|
{% endif %}
|
||||||
{% if item.redirect is defined %}
|
{% if item.redirect is defined %}
|
||||||
RedirectMatch "^(?!/\.well-known/).*" {{ item.redirect }}
|
RedirectMatch "^(?!/\.well-known/).*" {{ item.redirect }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user