- Type Parameters:
T
- the type of the implementing class so the fluid methods can return the correct type
- All Known Implementing Classes:
CorsSupport.Builder
,CorsSupportBase.Builder
,CrossOriginConfig.Builder
public interface CorsSetter<T>
Defines common behavior between
CrossOriginConfig
and CorsSupportBase.Builder
for assigning CORS-related
attributes.-
Method Summary
Modifier and TypeMethodDescriptionallowCredentials
(boolean allowCredentials) Sets the allow credentials flag.allowHeaders
(String... allowHeaders) Sets the allow headers.allowMethods
(String... allowMethods) Sets the allow methods.allowOrigins
(String... origins) Sets the allowOrigins.enabled
(boolean enabled) Sets whether this config should be enabled or not.exposeHeaders
(String... exposeHeaders) Sets the expose headers.maxAgeSeconds
(long maxAgeSeconds) Sets the maximum age.
-
Method Details
-
enabled
Sets whether this config should be enabled or not.- Parameters:
enabled
- true for this config to have effect; false for it to be ignored- Returns:
- updated setter
-
allowOrigins
Sets the allowOrigins.- Parameters:
origins
- the origin value(s)- Returns:
- updated setter
-
allowHeaders
Sets the allow headers.- Parameters:
allowHeaders
- the allow headers value(s)- Returns:
- updated setter
-
exposeHeaders
Sets the expose headers.- Parameters:
exposeHeaders
- the expose headers value(s)- Returns:
- updated setter
-
allowMethods
Sets the allow methods.- Parameters:
allowMethods
- the allow method value(s)- Returns:
- updated setter
-
allowCredentials
Sets the allow credentials flag.- Parameters:
allowCredentials
- the allow credentials flag- Returns:
- updated setter
-
maxAgeSeconds
Sets the maximum age.- Parameters:
maxAgeSeconds
- the maximum age- Returns:
- updated setter
-