PS if you're running the Racket web server as a proxy behind Apache, then 
`request-client-ip` will always be the localhost IP. However, Apache stores the 
original request IP in special header called X-Forwarded-For [1] which can be 
retrieved like so:

(dict-ref (request-headers req) 'x-forwarded-for)

[1] http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers



> On 17 Apr 2018, at 1:59 PM, David Storrs <david.sto...@gmail.com> wrote:
> 
> Ugh.  How did I miss that?  Thanks, Jay.
> 
> On Tue, Apr 17, 2018 at 4:31 PM, Jay McCarthy <jay.mccar...@gmail.com> wrote:
>> request-client-ip on the request object your handler gets.
>> 
>> Jay

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to