mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-11 22:12:23 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user