Configuration
class Configuration
CORS feature configuration
Constructors
Configuration() CORS feature configuration |
Properties
var allowCredentials: Boolean Allow sending credentials |
|
var allowSameOrigin: Boolean Allow requests from the same origin |
|
Exposed HTTP headers that could be accessed by a client |
|
Allowed CORS headers |
|
Allowed CORS hosts |
|
var maxAge: Duration Max-Age for cached CORS options |
|
val methods: HashSet<HttpMethod> Allowed HTTP methods |
Functions
fun anyHost(): Unit Allow requests from any host |
|
Allow to expose header |
|
fun exposeXHttpMethodOverride(): Unit Allow to expose |
|
Allow sending header |
|
fun host( Allow requests from the specified domains and schemes |
|
fun method(method: HttpMethod): Unit Please note that CORS operates ONLY with REAL HTTP methods
and will never consider overridden methods via |
Companion Object Properties
Default HTTP headers that are always allowed by CORS |
|
val CorsDefaultMethods: Set<HttpMethod> Default HTTP methods that are always allowed by CORS |