Answer the question
In order to leave comments, you need to log in
How to recognize users when using Nginx Push Stream Module?
I am doing a chat on WebSocket, everything works fine, but there is one gag, how can I determine which user has logged in and which user has logged out using the Nginx Push Stream Module? And in general, is this possible and how do they solve such problems in chat rooms?
Separating all users into different channels will not work, then they stop seeing each other's messages.
Answer the question
In order to leave comments, you need to log in
You can authenticate the user using a proxy:
https://github.com/wandenberg/nginx-push-stream-mo...
At a glance: When authorizing, it is enough to write the key during authorization in memcache (or other in-memory db) and update its lifetime when receiving a long-pulling request from the backend proxy.
And in general, is this possible and how do they solve such problems in chat rooms?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question