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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user