CorsCallback

class CorsCallback(    allowedOrigin: Regex,     allowedMethods: Set<HttpMethod> = ALL,     allowedHeaders: Set<String> = emptySet(),     exposedHeaders: Set<String> = emptySet(),     supportCredentials: Boolean = true,     preFlightStatus: SuccessStatus = NO_CONTENT,     preFlightMaxAge: Long = 0) : Function1<HttpServerContext, HttpServerContext>

HTTP CORS callback. It holds info for CORS.

Constructors

Link copied to clipboard
fun CorsCallback(    allowedOrigin: String = "*",     allowedMethods: Set<HttpMethod> = ALL,     allowedHeaders: Set<String> = emptySet(),     exposedHeaders: Set<String> = emptySet(),     supportCredentials: Boolean = true,     preFlightStatus: SuccessStatus = NO_CONTENT,     preFlightMaxAge: Long = 0)
Link copied to clipboard
fun CorsCallback(    allowedOrigin: Regex,     allowedMethods: Set<HttpMethod> = ALL,     allowedHeaders: Set<String> = emptySet(),     exposedHeaders: Set<String> = emptySet(),     supportCredentials: Boolean = true,     preFlightStatus: SuccessStatus = NO_CONTENT,     preFlightMaxAge: Long = 0)

Functions

Link copied to clipboard
open operator override fun invoke(context: HttpServerContext): HttpServerContext