miguelgrinberg / simple-websocket

Simple WebSocket server and client for Python.
MIT License
79 stars 17 forks source link

Get client's `header` in `Server` class? #38

Open mirusu400 opened 6 months ago

mirusu400 commented 6 months ago

Hello.

Related with flask-sock library, I'm trying to get client's headers (Like cookies, Sec-Websocket-Key, ...) from Server class.

But it seems there are no ways to get client's information, such as cookies, headers, etc..

Is there any way to get client's information?

miguelgrinberg commented 6 months ago

With Flask-Sock you have a Flask view function, you can use Flask's request to access headers, cookies, etc.