Channels: get IP address of client websocket

532 views
Skip to first unread message

Fabien Millerand

unread,
Feb 17, 2017, 1:08:24 PM2/17/17
to Django developers (Contributions to Django itself)
As far as I know I cannot get client websocket public IP address with channels.

I even looked into the sessions and couldn't find anything.

Did I miss it?



Andrew Godwin

unread,
Feb 17, 2017, 1:22:27 PM2/17/17
to Django developers (Contributions to Django itself)
It's in the connect message, as message['client']: http://channels.readthedocs.io/en/latest/asgi.html#connection

Andrew

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/c2f88798-b212-47a2-b058-05b2021787ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fabien Millerand

unread,
Feb 19, 2017, 2:56:29 PM2/19/17
to Django developers (Contributions to Django itself)
Got it. Sorry and thanks.



Le vendredi 17 février 2017 19:22:27 UTC+1, Andrew Godwin a écrit :
It's in the connect message, as message['client']: http://channels.readthedocs.io/en/latest/asgi.html#connection

Andrew
On Fri, Feb 17, 2017 at 10:05 AM, Fabien Millerand <mill...@gmail.com> wrote:
As far as I know I cannot get client websocket public IP address with channels.

I even looked into the sessions and couldn't find anything.

Did I miss it?



--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.

Fabien Millerand

unread,
Feb 19, 2017, 3:23:09 PM2/19/17
to Django developers (Contributions to Django itself)
Just for info, it cannot be emulated in the HttpClient for testing, unlike the  regular django one where REMOTE_ADDR='IP_ADDRESS' can be passed
Reply all
Reply to author
Forward
0 new messages