Getting ip address from socket connection

61 views
Skip to first unread message

nate.t...@gmail.com

unread,
Jun 26, 2017, 12:14:27 PM6/26/17
to phoenix-talk
Hey,

We really need to get IP address and do security checks on it during connection as users can login only from white-listed IPs. 

I know that currently this is not possible, but can someone provide a way how we can do by patching phoenix engine? Or at least from what module we need to dig?

I see that socket has a pid of Phoenix.Socket.Transport, which uses conn, can we get client's IP from there?

Regards,
Nate

Bin Ury

unread,
Jun 27, 2017, 12:15:45 AM6/27/17
to phoenix-talk, nate.t...@gmail.com

nate.t...@gmail.com

unread,
Jun 27, 2017, 8:09:38 AM6/27/17
to phoenix-talk
You are messing controller with socket, there's no direct access to conn.
Reply all
Reply to author
Forward
0 new messages