@ConfigurationProperties(value="cors") public static class HttpServerConfiguration.CorsConfiguration extends 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 |
---|---|
Map<String,CorsOriginConfiguration> |
getConfigurations() |
boolean |
isEnabled() |
boolean |
isSingleHeader() |
void |
setConfigurations(Map<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 Map<String,CorsOriginConfiguration> getConfigurations()
public boolean isSingleHeader()
public void setEnabled(boolean enabled)
enabled
- True if CORS is enabledpublic void setConfigurations(Map<String,CorsOriginConfiguration> configurations)
configurations
- The CORS configurationspublic void setSingleHeader(boolean singleHeader)
singleHeader
- The single header flag