Class XForwardedRequestWrapperFactory.Config
- java.lang.Object
-
- org.apache.wicket.protocol.http.servlet.XForwardedRequestWrapperFactory.Config
-
- Enclosing class:
- XForwardedRequestWrapperFactory
public static class XForwardedRequestWrapperFactory.Config extends Object
Filter Config
-
-
Constructor Summary
Constructors Constructor Description Config()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEnabled()
void
setAllowedInternalProxies(String allowedInternalProxies)
Comma delimited list of internal proxies.void
setEnabled(boolean enable)
Enable / disable XForwarded related processingvoid
setHttpServerPort(int httpServerPort)
Server Port value if theprotocolHeader
does not indicate HTTPSvoid
setHttpsServerPort(int httpsServerPort)
Server Port value if theprotocolHeader
indicates HTTPSvoid
setProtocolHeader(String protocolHeader)
Header that holds the incoming protocol, usally namedX-Forwarded-Proto
.void
setProtocolHeaderSslValue(String protocolHeaderSslValue)
Case insensitive value of the protocol header to indicate that the incoming http request uses SSL.void
setProxiesHeader(String proxiesHeader)
The proxiesHeader directive specifies a header into which mod_remoteip will collect a list of all of the intermediate client IP addresses trusted to resolve the actual remote IP.void
setRemoteIPHeader(String remoteIPHeader)
Name of the http header from which the remote ip is extracted.void
setTrustedProxies(String trustedProxies)
Comma delimited list of proxies that are trusted when they appear in theremoteIPHeader
header.
-
-
-
Constructor Detail
-
Config
public Config()
-
-
Method Detail
-
setAllowedInternalProxies
public void setAllowedInternalProxies(String allowedInternalProxies)
Comma delimited list of internal proxies. Expressed with regular expressions.Default value : 10\.\d{1,3}\.\d{1,3}\.\d{1,3}, 192\.168\.\d{1,3}\.\d{1,3}, 172\\.(?:1[6-9]|2\\d|3[0-1]).\\d{1,3}.\\d{1,3}, 169\.254\.\d{1,3}\.\d{1,3}, 127\.\d{1,3}\.\d{1,3}\.\d{1,3}
- Parameters:
allowedInternalProxies
-
-
setHttpServerPort
public void setHttpServerPort(int httpServerPort)
Server Port value if theprotocolHeader
does not indicate HTTPSDefault value : 80
- Parameters:
httpServerPort
-
-
setHttpsServerPort
public void setHttpsServerPort(int httpsServerPort)
Server Port value if theprotocolHeader
indicates HTTPSDefault value : 443
- Parameters:
httpsServerPort
-
-
setProtocolHeader
public void setProtocolHeader(String protocolHeader)
Header that holds the incoming protocol, usally namedX-Forwarded-Proto
. Ifnull
, request.scheme and request.secure will not be modified.Default value :
null
- Parameters:
protocolHeader
-
-
setProtocolHeaderSslValue
public void setProtocolHeaderSslValue(String protocolHeaderSslValue)
Case insensitive value of the protocol header to indicate that the incoming http request uses SSL.Default value :
HTTPS
- Parameters:
protocolHeaderSslValue
-
-
setProxiesHeader
public void setProxiesHeader(String proxiesHeader)
The proxiesHeader directive specifies a header into which mod_remoteip will collect a list of all of the intermediate client IP addresses trusted to resolve the actual remote IP. Note that intermediate RemoteIPTrustedProxy addresses are recorded in this header, while any intermediate RemoteIPInternalProxy addresses are discarded.Name of the http header that holds the list of trusted proxies that has been traversed by the http request.
The value of this header can be comma delimited.
Default value :
X-Forwarded-By
- Parameters:
proxiesHeader
-
-
setRemoteIPHeader
public void setRemoteIPHeader(String remoteIPHeader)
Name of the http header from which the remote ip is extracted.The value of this header can be comma delimited.
Default value :
X-Forwarded-For
- Parameters:
remoteIPHeader
-
-
setTrustedProxies
public void setTrustedProxies(String trustedProxies)
Comma delimited list of proxies that are trusted when they appear in theremoteIPHeader
header. Can be expressed as a regular expression.Default value : empty list, no external proxy is trusted.
- Parameters:
trustedProxies
-
-
setEnabled
public void setEnabled(boolean enable)
Enable / disable XForwarded related processing- Parameters:
enable
-
-
isEnabled
public boolean isEnabled()
- Returns:
- True, if filter is active
-
-