cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorenzo De Sio <l.de...@w4b.it>
Subject R: Remote IP Detection - client detection issues
Date Fri, 29 Aug 2003 12:39:37 GMT
Jonathan,

with mod_proxy you should be able to use the "X-Forwarded-For" header.

The following works for me:


	String host = request.getHeader("X-Forwarded-For");
		
	if (host != null) {
		if (host.equals("")) {
			host = request.getRemoteAddr();
		}
	}

Cheers,

L.


-----Messaggio originale-----
Da: Jonothan Stribling [mailto:Jonothan.Stribling@melbourneit.com.au]
Inviato: venerdì 29 agosto 2003 8.15
A: users@cocoon.apache.org
Oggetto: Remote IP Detection - client detection issues


Hi All,

This issue is not so much specifically a problem with Cocoon, it is more
an environmental issue. 

We use mod_proxy and Apache HTTP Server and proxy requests to Cocoon on
port 8080. The problem is that we need to detect the Client IP address
from cocoon and using request.getRemoteAddr() returns the servers IP
address because it is correctly identified as the client. This is not
terribly useful.

Can someone advise how how we can get the actual clients IP?  Does this
mean we cannot use mod_proxy and instead have to use mod_rewrite?

Any advice would be appreciated.

Regards

Jonothan Stribling
Team Technical Lead - Web Development 
jonothan.stribling@melbourneit.com.au
Melbourne IT Ltd


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message