-
Notifications
You must be signed in to change notification settings - Fork 562
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 the ability to get the ip address of the client in websocket #8856
Comments
One option would be to make the WsSession ws = ...
PeerInfo peer = ws.socketContext().remotePeer(); Are you using the Proxy Protocol in your app? |
Yes, I might, thanks! |
If using https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt then there's already support for it (it just needs to be enabled by turning it on the listener) and you get host and port info in the request headers |
OK,thanks! |
Environment Details
Problem Description
In actual use, often need to get the ip address of the client, in the websocket server development.
The text was updated successfully, but these errors were encountered: