Interface ControlPanelRequestConfiguration


@ConfigurationProperties("micronaut.control-panel.security") public interface ControlPanelRequestConfiguration
Configuration for the control panel request-origin protections applied to mutating HTTP requests and for the host allowlist used when the control panel is reachable anonymously.
Since:
2.2.1
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Set<String>
    Additional host names (optionally with a port) that are accepted when the host check is active, beyond the built-in loopback names.
    boolean
    Whether same-origin protection (Fetch Metadata, Origin and the control panel request header) is enforced for mutating control panel requests.
    boolean
    Whether the host allowlist is enforced when the control panel is reachable without authentication.
  • Field Details

  • Method Details

    • isCsrfProtectionEnabled

      @Bindable(defaultValue="true") boolean isCsrfProtectionEnabled()
      Whether same-origin protection (Fetch Metadata, Origin and the control panel request header) is enforced for mutating control panel requests. Default: "true".
      Returns:
      whether cross-site request protection is enabled
    • isHostCheckEnabled

      @Bindable(defaultValue="true") boolean isHostCheckEnabled()
      Whether the host allowlist is enforced when the control panel is reachable without authentication. Default: "true".
      Returns:
      whether the host check is enabled
    • getAllowedHosts

      @Bindable(defaultValue="") @Nullable Set<String> getAllowedHosts()
      Additional host names (optionally with a port) that are accepted when the host check is active, beyond the built-in loopback names. Each entry is matched case-insensitively and may be a bare host or host:port.
      Returns:
      the configured additional allowed hosts