Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Read IP and port from headers #64

Open
everissimo opened this issue Nov 30, 2019 · 2 comments
Open

Read IP and port from headers #64

everissimo opened this issue Nov 30, 2019 · 2 comments

Comments

@everissimo
Copy link

When I execute the server behind a reverse proxy, I get 127.0.0.1 as ip. I configured the headers to write X-Real-IP, but there is no way to access it. What should be the right way to get the user ip?

@vti
Copy link
Owner

vti commented Dec 2, 2019

Normally I would use a wrapper around Protocol::WebSocket, like a PSGI application or so, so you can get IP before going to Protocol::WebSocket if you need it.

You can probably use a hack for accessing $req->{headers} structure if you're brave enough.. :)

@everissimo
Copy link
Author

everissimo commented Dec 6, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants