From c21544d9b63b18c7063b9e8d5752f3a559ae3c06 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Sat, 15 Nov 2025 23:40:43 +0100 Subject: [PATCH] Refine Apache configuration for WebSocket handling and improve request processing This commit updates the Apache configuration to enhance WebSocket support by clarifying the directives. It ensures proper handling of WebSocket upgrade requests and introduces a fallback mechanism for HTTP polling. Additionally, it encapsulates header settings for better compatibility and emphasizes the order of LocationMatch blocks. These changes improve the server's capability to manage real-time communication effectively. --- apache.conf.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apache.conf.example b/apache.conf.example index 6c2e16f..7dd22f5 100644 --- a/apache.conf.example +++ b/apache.conf.example @@ -40,8 +40,8 @@ # Andernfalls wird ProxyPass verwendet (für HTTP-Polling) RewriteEngine on - RewriteCond %{HTTP:Upgrade} =websocket [NC] - RewriteCond %{HTTP:Connection} =upgrade [NC] + RewriteCond %{HTTP:Upgrade} websocket [NC] + RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule ^/?(.*) ws://localhost:3050/$1 [P,L] # Fallback für HTTP-Polling (wird verwendet, wenn RewriteRule nicht greift)