Refine Apache configuration for WebSocket handling and improve request processing

This commit updates the Apache configuration to enhance WebSocket support by clarifying the <LocationMatch> 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.
This commit is contained in:
Torsten Schulz (local)
2025-11-15 23:40:43 +01:00
parent 6167116630
commit c21544d9b6

View File

@@ -40,8 +40,8 @@
# Andernfalls wird ProxyPass verwendet (für HTTP-Polling)
<LocationMatch "^/socket\.io/">
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)