You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
@allow_anonymous()
async def __websocket_handler(websocket: WebSocket, client_id: str) -> None:
"""Websocket handler."""
connection = await hub.connect(websocket, client_id)
def configure_websocket(app: Application) -> None:
"""Configure WebSocket."""
app.router.add_ws('/ws/{client_id}', __websocket_handler) # type: ignore
If I don't add @allow_anonymous, web socket connection can not be setup.
How to add token in WebSocket request:
ws://qii-sandbox/QMOSDS/ws/client_id
Beta Was this translation helpful? Give feedback.
All reactions