[Seaside] self requestContext request remoteAddress always 127.0.0.1

Johan Brichau johan at inceptive.be
Thu Apr 11 17:46:03 UTC 2013


If you are using nginx as a front-end proxy, you can transmit the IP address of the requester like this:

        location / {
                proxy_pass        http://localhost:5984;
                proxy_set_header  X-Real-IP  $remote_addr;
        }    


On 11 Apr 2013, at 17:35, Norbert Hartl <norbert at hartl.name> wrote:

> Sabine,
> 
> if you have a normal setup that would mean you use a front-end web server that accepts requests and forward them to the smalltalk image. In this case the connection would go from 127.0.0.1 to 127.0.0.1 so the information you are requesting is valid. In this case it is also common that the front-end server writes the originating IP address in a http header. Have a look at 
> 
> http://en.wikipedia.org/wiki/X-Forwarded-For
> 
> Then I would advize to have a look at the headers of the request in
> 
> self requestContext request headers
> 
> to find any header containing the information you are looking for in case it is not the one above.
> 
> Norbert
> 
> Am 11.04.2013 um 17:21 schrieb Milan Mimica <milan.mimica at gmail.com>:
> 
>> If there is a Http proxy running on your server you will get its ip address.
>> 
>> 
>> On Thursday, 11 April 2013, Sabine Knöfel <sabine.knoefel at gmail.com> wrote:
>> > Hi,
>> >
>> > I want to get the ip adress of the user with:
>> >
>> > self requestContext request remoteAddress
>> >
>> > But this returns always 127.0.0.1, also on the remote system.
>> >
>> > E.g. http://ec2-176-34-68-88.eu-west-1.compute.amazonaws.com/
>> > in the first line of the page, I did
>> >
>> > html text: self requestContext request remoteAddress.
>> >
>> > I would expect the ip adress of my provider
>> >
>> > Did I miss somethng?
>> >
>> > Sabine
>> >
>> >
>> >
>> > --
>> > View this message in context: http://forum.world.st/self-requestContext-request-remoteAddress-always-127-0-0-1-tp4680862.html
>> > Sent from the Seaside General mailing list archive at Nabble.com.
>> > _______________________________________________
>> > seaside mailing list
>> > seaside at lists.squeakfoundation.org
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>> 
>> -- 
>> Milan Mimica
>> http://sparklet.sf.net
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list