Class HttpServerConfiguration.HostResolutionConfiguration

  • Enclosing class:
    HttpServerConfiguration

    @ConfigurationProperties("host-resolution")
    public static class HttpServerConfiguration.HostResolutionConfiguration
    extends java.lang.Object
    Configuration for host resolution with the HttpHostResolver.
    • Constructor Detail

      • HostResolutionConfiguration

        public HostResolutionConfiguration()
    • Method Detail

      • getHostHeader

        public java.lang.String getHostHeader()
        Returns:
        The host header name
      • setHostHeader

        public void setHostHeader​(java.lang.String hostHeader)
        Parameters:
        hostHeader - The header name that stores the host
      • getProtocolHeader

        public java.lang.String getProtocolHeader()
        Returns:
        The protocol header name
      • setProtocolHeader

        public void setProtocolHeader​(java.lang.String protocolHeader)
        Parameters:
        protocolHeader - The header name that stores the protocol
      • getPortHeader

        public java.lang.String getPortHeader()
        Returns:
        The port header name
      • setPortHeader

        public void setPortHeader​(java.lang.String portHeader)
        Parameters:
        portHeader - The header name that stores the port
      • isPortInHost

        public boolean isPortInHost()
        Returns:
        If the host header supports a port
      • setPortInHost

        public void setPortInHost​(boolean portInHost)
        Parameters:
        portInHost - True if the host header supports a port appended with :. Default value (DEFAULT_PORT_IN_HOST).
      • getAllowedHosts

        public java.util.List<java.util.regex.Pattern> getAllowedHosts()
        Returns:
        The list of hosts to validate the resolved host against.
      • setAllowedHosts

        public void setAllowedHosts​(java.util.List<java.lang.String> allowedHosts)
        Parameters:
        allowedHosts - The list of allowed host regex patterns. Any resolved host must match one of the configured hosts if the list is supplied. Each host is passed through Pattern.compile(String).
      • headersConfigured

        public boolean headersConfigured()
        Returns:
        True if any host headers have been configured