On Tue, 21 Apr 2020 at 00:30, Tim Nelson <timn...@gmail.com> wrote:

> Well if you want the clients IP logged or need to do something with it on
> the request:
>
>    set_real_ip_from 0.0.0.0/0;
>    real_ip_header X-Forwarded-For;
>    real_ip_recursive on;
>

Thanks for the tip. I'll have to look into those in due course.

Shaheed


>
> On Mon, Apr 20, 2020 at 5:55 PM Shaheed Haque <shaheedha...@gmail.com>
> wrote:
>
>>
>>
>> On Mon, 20 Apr 2020 at 21:54, Filbert <timn...@gmail.com> wrote:
>>
>>> *Answering my own question.    AWS classic ELBs never worked properly
>>> with websockets. Need to convert them to ALBs.*
>>>
>>
>> Thanks for closing the loop; this is quite likely to be in my future. Did
>> you need any nginx config changes?
>>
>> Shaheed
>>
>> On Tuesday, April 14, 2020 at 5:37:54 PM UTC-4, Filbert wrote:
>>>>
>>>> Using AWS ELB, I was able to serve HTTP (via uwsgi) and websockets
>>>> through Nginx with Nginx handling the SSL certs.
>>>>
>>>> Once I tried to offloading SSL certs to the ELB so I could capture
>>>> X-Forwarded-For, websockets fail to route/upgrade to Daphne and I get "Not
>>>> Found: /ws/" in uwsgi's logs.
>>>>
>>>> Here is the relevant (working) piece of Nginx .conf file using TCP/443
>>>> pass thru from the ELB:
>>>>
>>>> location /ws {
>>>>             proxy_pass http://unix:/opt/toogo/run/r117.0.4.3720.ws;
>>>>  #Obviously daphne is listening here
>>>>             proxy_set_header Upgrade $http_upgrade;
>>>>             proxy_set_header Connection "upgrade";
>>>>             proxy_http_version 1.1;
>>>>             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>>>>             proxy_set_header Host $host;
>>>>     }
>>>>
>>>> What change is required if I offload the SSL certs to the ELB and
>>>> introduce X-Forwarded-for?
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/305b31ae-ff69-425a-a173-645c55ba07a1%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/305b31ae-ff69-425a-a173-645c55ba07a1%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/iNoIPxDgv90/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHAc2jf1KNYe-p2JM-XLD2q8HpC_29oNrJ24KkyjVFRj%2BpPo%2BQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAHAc2jf1KNYe-p2JM-XLD2q8HpC_29oNrJ24KkyjVFRj%2BpPo%2BQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK09zoq2pD6MsMfXA6y_rj4CUvcxgrT-w11xYCSvaUjdm8TD_Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK09zoq2pD6MsMfXA6y_rj4CUvcxgrT-w11xYCSvaUjdm8TD_Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHAc2jcGo1YFJhJNf%2Bt1BfhD60dG%3DwUaamU5M9Wg_ksAm4HWaQ%40mail.gmail.com.

Reply via email to