|
aerogear-controller 1.0.0.M1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.aerogear.controller.router.decorators.cors.CorsConfig
public class CorsConfig
Concrete implementation of CorsConfiguration which provides configuration of CORS in AeroGear Controller.
CorsHandler| Nested Class Summary | |
|---|---|
private static class |
CorsConfig.Builder
|
static interface |
CorsConfig.Cookies
|
static interface |
CorsConfig.ExposeHeaders
|
static interface |
CorsConfig.MaxAge
|
static interface |
CorsConfig.Origin
|
static interface |
CorsConfig.SupportedOptions
|
static interface |
CorsConfig.ValidRequestHeaders
|
static interface |
CorsConfig.ValidRequestMethods
|
| Field Summary | |
|---|---|
private boolean |
allowCookies
|
private boolean |
anyOrigin
|
private boolean |
corsSupportEnabled
|
private String |
exposeHeaders
|
private long |
maxAge
|
private Set<String> |
validRequestHeaders
|
private Set<String> |
validRequestMethods
|
| Constructor Summary | |
|---|---|
private |
CorsConfig(CorsConfig.Builder builder)
|
| Method Summary | |
|---|---|
boolean |
allowCookies()
Determines if cookies are supported. |
boolean |
anyOrigin()
Determines is any origin, "*", is supported. |
static CorsConfiguration |
defaultConfig()
Returns a CorsConfiguration instance with the default values for all properties. |
static CorsConfiguration |
disableCorsSupport()
|
static CorsConfig.Origin |
enableCorsSupport()
Returns a CorsConfig.Origin instance which can be configured as needed |
boolean |
exposeHeaders()
Determines if there are any headers configured to be exposed to calling clients. |
String |
getExposeHeaders()
Returns a comma separated string of headers to be exposed to calling clients. |
long |
getMaxAge()
Gets the maxAge setting. |
Set<String> |
getValidRequestHeaders()
Returns the allowed set of Request Headers. |
Set<String> |
getValidRequestMethods()
Returns the allowed set of Request Methods. |
boolean |
hasMaxAge()
Determines is maxAge has been configured. |
boolean |
isCorsSupportEnabled()
Determines is support for CORS is enabled. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final boolean corsSupportEnabled
private final String exposeHeaders
private final boolean anyOrigin
private final boolean allowCookies
private final long maxAge
private final Set<String> validRequestMethods
private final Set<String> validRequestHeaders
| Constructor Detail |
|---|
private CorsConfig(CorsConfig.Builder builder)
| Method Detail |
|---|
public static CorsConfig.Origin enableCorsSupport()
CorsConfig.Origin instance which can be configured as needed
CorsConfig.Origin to be used to configure and build a CorsConfiguration instance.public static CorsConfiguration disableCorsSupport()
public static CorsConfiguration defaultConfig()
CorsConfiguration instance with the default values for all properties.
CorsConfiguration with default properties set.public boolean isCorsSupportEnabled()
CorsConfiguration
isCorsSupportEnabled in interface CorsConfigurationtrue if support for CORS is enabled, false otherwise.public boolean exposeHeaders()
CorsConfiguration
exposeHeaders in interface CorsConfigurationtrue if there are headers that should be exposed to clients.CorsConfiguration.getExposeHeaders()public String getExposeHeaders()
CorsConfiguration
getExposeHeaders in interface CorsConfigurationString a comma separated string of headers to be exposed.public boolean anyOrigin()
CorsConfiguration
anyOrigin in interface CorsConfigurationtrue if any origin is allowed.public boolean allowCookies()
CorsConfiguration
allowCookies in interface CorsConfigurationtrue if cookies are supported.public boolean hasMaxAge()
CorsConfiguration
hasMaxAge in interface CorsConfigurationtrue if maxAge has been set.CorsConfiguration.getMaxAge()public long getMaxAge()
CorsConfiguration
getMaxAge in interface CorsConfigurationlong the time in seconds that a preflight request may be cached.public Set<String> getValidRequestMethods()
CorsConfiguration
getValidRequestMethods in interface CorsConfigurationSet strings that represent the allowed Request Methods.public Set<String> getValidRequestHeaders()
CorsConfiguration
getValidRequestHeaders in interface CorsConfigurationSet of strings that represent the allowed Request Headers.public String toString()
toString in class Object
|
aerogear-controller 1.0.0.M1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||