try adding this method to your session class:

    /** Returns the IP address of the client.
* This should return accurate information whether in direct connect or webserver deployment mode.
         * @return The IP address as a string.
         */
    public String clientIPAddress() {
        Object ipAddress = null;
                WORequest request = context().request();
                if (request!=null){
                        ipAddress = request.headerForKey("remote_addr");
                        if( ipAddress == null ) {
                                ipAddress = request.headerForKey("remote_host");
                                if( ipAddress == null ) {
                                        ipAddress = request._remoteAddress();
                                        if( ipAddress == null ) {
                                                ipAddress = 
request._originatingAddress();
if( ipAddress != null ) ipAddress = ((InetAddress)ipAddress).getHostAddress();
                                        }
                                }
                        }
                }
return ipAddress == null ? "<address unknown>" : ipAddress.toString();
    }


On Feb 5, 2009, at 2:11 AM, Amedeo Mantica wrote:

No one know anything about??
:-(

On 04/feb/09, at 12:49, Amedeo Mantica wrote:

Hi,

To prevent session hijacking i generally use the sender ip verification ( ERXRequest.remoteHostAddress() ) and works fine for http requests, but when we ae il SSL mode, WebObjects see all requests coming from 127.0.0.1 (and tecnically is right)

Now how to get the real ip address of the client ?

Regards
Amedeo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/amedeomailing%40insigno.it

This email sent to [email protected]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/george%40boxofficetickets.com

This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to