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 -
Method Summary
Modifier and TypeMethodDescriptionAdditional host names (optionally with a port) that are accepted when the host check is active, beyond the built-in loopback names.booleanWhether same-origin protection (Fetch Metadata,Originand the control panel request header) is enforced for mutating control panel requests.booleanWhether the host allowlist is enforced when the control panel is reachable without authentication.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_CSRF_PROTECTION_ENABLED
- See Also:
-
DEFAULT_HOST_CHECK_ENABLED
- See Also:
-
-
Method Details
-
isCsrfProtectionEnabled
@Bindable(defaultValue="true") boolean isCsrfProtectionEnabled()Whether same-origin protection (Fetch Metadata,Originand 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
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 orhost:port.- Returns:
- the configured additional allowed hosts
-