Closed mubarakalmehairbi closed 1 year ago
The websocket protocol does not have a way to set cookies, so it is not possible to update the flask user session from inside the socket route.
To share data between the websocket and http routes you can use your database or maybe a redis store.
How can I share flask's session object between a Websocket connection and HTTP request?
As an example, if part of the code looks like this:
It seems the key
number
will not be shared. How can I allow it to be shared?