heroku-python / flask-sockets

[DEPRECATED] Alternative: https://github.com/miguelgrinberg/flask-sock
MIT License
1.74k stars 167 forks source link

Allow additional setup before completing the handshake #57

Closed mthjs closed 2 years ago

mthjs commented 6 years ago

Similar to flask.app.before_request, allow to register functions that can do additional setup or validation of the request before opening a websocket connection.

This allows developers with similar questions as issue #34 to use a different way of authentication/authorization than cookies or session by preprocessing (custom) headers or query string parameters.

mthjs commented 6 years ago

@kennethreitz I'd love to hear your opinion on this