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:[EMAIL PROTECTED]
Inviato: venerd� 29 agosto 2003 8.15
A: [EMAIL PROTECTED]
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
[EMAIL PROTECTED]
Melbourne IT Ltd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]