feat: live-sync per websocket im backend

- /api/ws authentifiziert über das Session-Cookie, Origin-Pflicht gegen CSWSH
- Hub im Prozess verteilt clip.created/updated/deleted an alle Geräte des Benutzers
- Ereignisse erst nach erfolgreichem Commit (BackgroundTasks), keine bei Konflikt
- Logout, Session-Widerruf, Passwortänderung und Admin-Aktionen schließen
  betroffene Verbindungen (4401); Session wird alle 5 Minuten neu geprüft
- Heartbeat alle 30 s, höchstens 20 Verbindungen pro Benutzer
- CSP erlaubt wss:// zur eigenen Domain, eingehende WS-Nachrichten max. 64 KiB

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dbildhauerandClaude Opus 5.5 committed 2026-10-25 11:15:43 +01:00
1 parent a444f28681
commit 0d89399090
12 files changed
+483 -38

No files matched your search

+1
View File
@@ -18,6 +18,7 @@ exec uvicorn app.main:app \
--host 0.0.0.0 \
--port 8000 \
--workers 1 \
--ws-max-size 65536 \
--proxy-headers \
--forwarded-allow-ips "${FORWARDED_ALLOW_IPS:-127.0.0.1}" \
--log-level "${LOG_LEVEL:-info}"