Update Apache configuration and socket service for WebSocket support

This commit adds a ProxyTimeout setting for WebSocket connections in the Apache configuration, enhancing the server's ability to manage long-lived connections. Additionally, the socket service documentation is updated to clarify compatibility with both Apache and Nginx as reverse proxies. These changes improve the handling of real-time communication in the application.
This commit is contained in:
Torsten Schulz (local)
2025-11-15 23:10:32 +01:00
parent df6fb23132
commit 1ff3d9d1a6
2 changed files with 4 additions and 1 deletions

View File

@@ -49,6 +49,9 @@
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
# Timeouts für WebSocket-Verbindungen
ProxyTimeout 3600
</LocationMatch>
# API-Routen

View File

@@ -9,7 +9,7 @@ export const initializeSocketIO = (httpServer) => {
credentials: true,
methods: ['GET', 'POST']
},
// Wichtig für Reverse Proxy (Nginx): Path und Transports explizit setzen
// Wichtig für Reverse Proxy (Apache/Nginx): Path und Transports explizit setzen
path: '/socket.io/',
transports: ['websocket', 'polling'],
// Erlaube Upgrade von polling zu websocket