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
Ugh. How did I miss that? Thanks, Jay.
On Tue, Apr 17, 2018 at 4:31 PM, Jay McCarthy wrote:
> request-client-ip on the request object your handler gets.
>
> Jay
>
> On Tue, Apr 17, 2018 at 2:54 PM, David Storrs wrote:
>> Assume I'm a web server and one of the requests I want to respond to
>> i
request-client-ip on the request object your handler gets.
Jay
On Tue, Apr 17, 2018 at 2:54 PM, David Storrs wrote:
> Assume I'm a web server and one of the requests I want to respond to
> is "What is my public IP address?" More specifically, if the server
> receives an HTTP request to, let's s
Hi Alexis,
Great article. And timely too, since it addresses some of the same
usage issues of local-expand and stoplists that we ran into with
Turnstile.
(I'm also interested in why the core forms are added to the stop list.
Is it because of let-syntax? I know it's probably been mentioned
before
Assume I'm a web server and one of the requests I want to respond to
is "What is my public IP address?" More specifically, if the server
receives an HTTP request to, let's say, the ".../get-ip" endpoint then
it should send back an HTTP response containing the sender's public
IP. cf https://www.ip
This is interesting. The `Any` type in Typed Racket includes values that may
have higher-order "original" types. For example, it may have originally been a
typed function (-> Fixnum Fixnum) or (-> String Boolean), such that if you call
it without a contract guarding it, it should be an error. Th
6 matches
Mail list logo