New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for WebSocket rules in the routing #1709
Conversation
I'm willing to get this in to 1.0.0 since it will enable Quart to depend on Werkzeug, but I'd like to see documentation along the lines of "This is for routing only, Werkzeug itself does not handle websockets. This is useful for ASGI frameworks." |
Great, I've added some documentation with the note/warning. |
7d0ab59
to
7b5656b
Compare
Looking at how Discussing this in chat, we thought about whether WS requests should build external URLs for HTTP rules in the same way, for example in a rejection response. Since browsers assume URLs are relative and HTTP(S) unless told otherwise, we're assuming it's fine not to add this for now. |
This allows for Rules to be marked as a WebSocket route and only matched if the binding is websocket. It also ensures that when a websocket rule is built with a scheme it defaults to the `ws` or `wss` scheme.
This allows for Rules to be marked as a WebSocket route and only
matched if the binding is websocket. It also ensures that when a
websocket rule is built with a scheme it defaults to the
ws
orwss
scheme.