Class XForwardedRequestWrapperFactory.Config

    • Constructor Detail

    • 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 the protocolHeader does not indicate HTTPS

        Default value : 80

        Parameters:
        httpServerPort -
      • setHttpsServerPort

        public void setHttpsServerPort​(int httpsServerPort)
        Server Port value if the protocolHeader indicates HTTPS

        Default value : 443

        Parameters:
        httpsServerPort -
      • setProtocolHeader

        public void setProtocolHeader​(String protocolHeader)
        Header that holds the incoming protocol, usally named X-Forwarded-Proto. If null, 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 the remoteIPHeader 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