@ConfigurationProperties(value="cors") public static class HttpServerConfiguration.CorsConfiguration extends java.lang.Object implements Toggleable
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ENABLED |
static boolean |
DEFAULT_SINGLE_HEADER |
Constructor and Description |
---|
CorsConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,CorsOriginConfiguration> |
getConfigurations() |
boolean |
isEnabled() |
boolean |
isSingleHeader() |
void |
setConfigurations(java.util.Map<java.lang.String,CorsOriginConfiguration> configurations)
Sets the CORS configurations.
|
void |
setEnabled(boolean enabled)
Sets whether CORS is enabled.
|
void |
setSingleHeader(boolean singleHeader)
Sets whether CORS header values should be joined into a single header.
|
public static final boolean DEFAULT_ENABLED
public static final boolean DEFAULT_SINGLE_HEADER
public boolean isEnabled()
isEnabled
in interface Toggleable
public java.util.Map<java.lang.String,CorsOriginConfiguration> getConfigurations()
public boolean isSingleHeader()
public void setEnabled(boolean enabled)
enabled
- True if CORS is enabledpublic void setConfigurations(java.util.Map<java.lang.String,CorsOriginConfiguration> configurations)
configurations
- The CORS configurationspublic void setSingleHeader(boolean singleHeader)
singleHeader
- The single header flag