interface CorsHandler : Handler<RoutingContext>
A handler which implements server side http://www.w3.org/TR/cors/[CORS] support for Vert.x-Web.
Author
Tim Fox
abstract fun allowCredentials(allow: Boolean): CorsHandler
Set whether credentials are allowed. Note that user agents will block requests that use a wildcard as origin and include credentials. From the MDN documentation you can read: Important note: when responding to a credentialed request, server must specify a domain, and cannot use wild carding. |
|
abstract fun allowedHeader(headerName: String): CorsHandler
Add an allowed header |
|
abstract fun allowedHeaders(headerNames: MutableSet<String>): CorsHandler
Add a set of allowed headers |
|
abstract fun allowedMethod(method: HttpMethod): CorsHandler
Add an allowed method |
|
abstract fun allowedMethods(methods: MutableSet<HttpMethod>): CorsHandler
Add a set of allowed methods |
|
open static fun create(allowedOriginPattern: String): CorsHandler
Create a CORS handler |
|
abstract fun exposedHeader(headerName: String): CorsHandler
Add an exposed header |
|
abstract fun exposedHeaders(headerNames: MutableSet<String>): CorsHandler
Add a set of exposed headers |
|
abstract fun maxAgeSeconds(maxAgeSeconds: Int): CorsHandler
Set how long the browser should cache the information |