Skip to content

Conversation

@Harry-Lees
Copy link

Currently, the Security classes outlined in the documentation do not work for WebSocket endpoints. This has raised several questions on GitHub discussions/ issues.

There have been several PRs attempting to fix this issue, but it was always deemed not possible due to the WebSocket exception handling. I think this has changed with several recent updates to Starlette and FastAPI.

This uses the same theory behind the example in the Starlette docs on WebSockets.

@Harry-Lees Harry-Lees changed the title Read cookie from starlette.requests.HTTPConnection class ✨ Fix APIKeyQuery for WebSocket endpoints Jun 11, 2025
@github-actions github-actions bot added the conflicts Automatically generated when a PR has a merge conflict label Nov 24, 2025
@github-actions
Copy link
Contributor

This pull request has a merge conflict that needs to be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts Automatically generated when a PR has a merge conflict

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant