@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_LOCALHOST_PASS_THROUGH |
static boolean |
DEFAULT_SINGLE_HEADER |
Constructor and Description |
---|
CorsConfiguration() |
Modifier and Type | Method and Description |
---|---|
Map<String,CorsOriginConfiguration> |
getConfigurations() |
boolean |
isEnabled() |
boolean |
isLocalhostPassThrough() |
boolean |
isSingleHeader() |
void |
setConfigurations(Map<String,CorsOriginConfiguration> configurations)
Sets the CORS configurations.
|
void |
setEnabled(boolean enabled)
Sets whether CORS is enabled.
|
void |
setLocalhostPassThrough(boolean localhostPassThrough)
Sets whether localhost pass-through 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 static final boolean DEFAULT_LOCALHOST_PASS_THROUGH
public boolean isEnabled()
isEnabled
in interface Toggleable
public boolean isLocalhostPassThrough()
public Map<String,CorsOriginConfiguration> getConfigurations()
public boolean isSingleHeader()
public void setEnabled(boolean enabled)
enabled
- True if CORS is enabledpublic void setLocalhostPassThrough(boolean localhostPassThrough)
localhostPassThrough
- True if localhost pass-through is enabledpublic void setConfigurations(Map<String,CorsOriginConfiguration> configurations)
configurations
- The CORS configurationspublic void setSingleHeader(boolean singleHeader)
singleHeader
- The single header flag