Home

port_http_server / com.hexagonkt.http.server / CorsSettings

CorsSettings

data class CorsSettings

Constructors

Name Summary
<init> CorsSettings(allowedOrigin:String= "*", allowedMethods:Set<Method> = ALL, allowedHeaders:Set<String> = emptySet(), exposedHeaders:Set<String> = emptySet(), supportCredentials:Boolean= true, preFlightStatus:Int= 204, preFlightMaxAge:Long= 0)
CorsSettings(allowedOrigin:Regex, allowedMethods:Set<Method> = ALL, allowedHeaders:Set<String> = emptySet(), exposedHeaders:Set<String> = emptySet(), supportCredentials:Boolean= true, preFlightStatus:Int= 204, preFlightMaxAge:Long= 0)

Properties

Name Summary
allowedHeaders val allowedHeaders:Set<String>
allowedMethods val allowedMethods:Set<Method>
allowedOrigin val allowedOrigin:Regex
exposedHeaders val exposedHeaders:Set<String>
preFlightMaxAge val preFlightMaxAge:Long
preFlightStatus val preFlightStatus:Int
supportCredentials val supportCredentials:Boolean

Functions

Name Summary
accessControlAllowOrigin fun accessControlAllowOrigin(origin:String):String
allowOrigin fun allowOrigin(origin:String):Boolean