public static class XForwardedRequestWrapperFactory.Config extends Object
Constructor and Description |
---|
Config() |
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabled() |
void |
setAllowedInternalProxies(String allowedInternalProxies)
Comma delimited list of internal proxies.
|
void |
setEnabled(boolean enable)
Enable / disable XForwarded related processing
|
void |
setHttpServerPort(int httpServerPort)
Server Port value if the
protocolHeader does not indicate HTTPS |
void |
setHttpsServerPort(int httpsServerPort)
Server Port value if the
protocolHeader indicates HTTPS |
void |
setProtocolHeader(String protocolHeader)
Header that holds the incoming protocol, usally named
X-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 the
remoteIPHeader header. |
public void setAllowedInternalProxies(String allowedInternalProxies)
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}
allowedInternalProxies
- public void setHttpServerPort(int httpServerPort)
protocolHeader
does not indicate HTTPS
Default value : 80
httpServerPort
- public void setHttpsServerPort(int httpsServerPort)
protocolHeader
indicates HTTPS
Default value : 443
httpsServerPort
- public void setProtocolHeader(String protocolHeader)
X-Forwarded-Proto
. If
null
, request.scheme and request.secure will not be modified.
Default value : null
protocolHeader
- public void setProtocolHeaderSslValue(String protocolHeaderSslValue)
Default value : HTTPS
protocolHeaderSslValue
- public void setProxiesHeader(String proxiesHeader)
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
proxiesHeader
- public void setRemoteIPHeader(String remoteIPHeader)
The value of this header can be comma delimited.
Default value : X-Forwarded-For
remoteIPHeader
- public void setTrustedProxies(String trustedProxies)
remoteIPHeader
header. Can be expressed as a regular expression.
Default value : empty list, no external proxy is trusted.
trustedProxies
- public void setEnabled(boolean enable)
enable
- public boolean isEnabled()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.