Fix: verify_ws_origin async + await callers
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
- auth.py: verify_ws_origin is now async def - kommunikation/routes.py: await verify_ws_origin - ai_ui_control/routes.py: await verify_ws_origin
This commit is contained in:
@@ -209,7 +209,7 @@ async def ai_ui_control_ws(websocket: WebSocket):
|
||||
from app.core.service_container import get_container
|
||||
|
||||
settings = get_settings()
|
||||
if not verify_ws_origin(websocket):
|
||||
if not await verify_ws_origin(websocket):
|
||||
await websocket.close(code=4003, reason="Origin not allowed")
|
||||
return
|
||||
|
||||
|
||||
@@ -477,7 +477,7 @@ async def websocket_endpoint(
|
||||
from app.core.auth import get_session_data, get_redis, verify_ws_origin
|
||||
|
||||
settings = get_settings()
|
||||
if not verify_ws_origin(websocket):
|
||||
if not await verify_ws_origin(websocket):
|
||||
await websocket.close(code=4003, reason="Origin not allowed")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user