|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.util.http.RequestHelper
public abstract class RequestHelper
Static helper function for extracting special information from requests.
Constructor Summary | |
---|---|
RequestHelper()
|
Method Summary | |
---|---|
static String |
getRealRemoteIP(javax.servlet.http.HttpServletRequest request)
Get the remote IP address of the client taking the X-Forwarded-for header into account. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestHelper()
Method Detail |
---|
public static String getRealRemoteIP(javax.servlet.http.HttpServletRequest request)
Get the remote IP address of the client taking the
X-Forwarded-for
header into account.
If no X-Forwarded-for
header is present,
the value of ServletRequest.getRemoteAddr()
is returned.
If a X-Forwarded-for
header is present,
the leftmost value in the comma-separated list of
X-Forwarded-for
-addresses is returned.
The rationale for returning the leftmost address is, that
this is the original address of the client.
request
- A HTTP servlet request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |