fix: exclude WebSocket from rate limiting to prevent UI lockout
The /ws endpoint was rate limited to 30 connections/minute. After prolonged use with WebSocket reconnections (network hiccups, browser tab throttling, etc.), users with many Docker containers would hit this limit and get stuck with a 'Connecting...' UI. WebSocket connections are already authenticated via session/API token and reconnections are normal behavior, so rate limiting is not needed. Fixes #859 (second report about WebSocket rate limiting after hours of use).
This commit is contained in:
parent
fdb6789a63
commit
bb2b1d7fb1
1 changed files with 1 additions and 0 deletions
|
|
@ -136,6 +136,7 @@ func UniversalRateLimitMiddleware(next http.Handler) http.Handler {
|
|||
skipPaths := []string{
|
||||
"/api/state", // Real-time state updates
|
||||
"/api/guests/metadata", // Guest metadata (polled frequently)
|
||||
"/ws", // WebSocket connections (authenticated, reconnections are normal)
|
||||
}
|
||||
for _, path := range skipPaths {
|
||||
if strings.Contains(r.URL.Path, path) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue