Interface HostValidationConfig


public interface HostValidationConfig
HTTP Host header validation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<Set<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String>>
    Allowed hosts.
    Require that HTTP Host authority can only contain valid localhost names such as "localhost", "127.0.0.1" or "[::1]".
  • Method Details

    • requireLocalhost

      Optional<Boolean> requireLocalhost()
      Require that HTTP Host authority can only contain valid localhost names such as "localhost", "127.0.0.1" or "[::1]".

      This requirement is enforced in production and dev modes, when neither this nor the allowedHosts() properties are configured and the "quarkus.http.host" property has a valid localhost name. Set this property to false if it is not required.

      Note this property is mutually exclusive with the allowedHosts() property.

    • allowedHosts

      Optional<Set<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String>> allowedHosts()
      Allowed hosts.

      A comma-separated set of hosts, for example: "localhost", "quarkus.io".

      Note this property is mutually exclusive with the requireLocalhost() property.