From 0bab1b82a4bd524c2e68f4857d1741fbb55151db Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Mon, 3 Jun 2024 11:50:22 +0200 Subject: [PATCH] fix: [ntfy] add websocket support --- ntfy/metadata.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ntfy/metadata.yml b/ntfy/metadata.yml index 3117c99..9611dbc 100644 --- a/ntfy/metadata.yml +++ b/ntfy/metadata.yml @@ -26,8 +26,11 @@ uses: apache-custom-rules: - !var-expand | - ProxyPass /ws ws://${MASTER_BASE_SERVICE_NAME}:80/ws" - ProxyPassReverse /ws ws://${MASTER_BASE_SERVICE_NAME}:80/ws" + RewriteEngine On + RewriteCond %{HTTP:Upgrade} ^websocket$ [NC] + RewriteCond %{HTTP:Connection} Upgrade [NC] + RewriteRule /(.*)$ ws://${MASTER_BASE_SERVICE_NAME}:80/\$1 [P,L] + RedirectMatch permanent "^/([-_A-Za-z0-9]{0,64})$" "https://%{SERVER_NAME}/$1"