@app.websocket(“/ws”)
async def websocket_endpoint(ws: WebSocket):
await ws.accept()
key = ws.headers.get(‘sec-websocket-key’)
@app.websocket(“/ws”)
async def websocket_endpoint(ws: WebSocket):
await ws.accept()
key = ws.headers.get(‘sec-websocket-key’)