CORS
class CORS
CORS feature. Please read http://ktor.io/servers/features/cors.html first before using it.
Types
class Configuration CORS feature configuration |
|
companion object Feature : Feature object for installation |
Constructors
CORS(configuration: Configuration) CORS feature. Please read http://ktor.io/servers/features/cors.html first before using it. |
Properties
All allowed headers to be sent including simple |
|
Set of all allowed headers |
|
val allowCredentials: Boolean Allow to pass credentials |
|
val allowSameOrigin: Boolean Allow requests from the same origin |
|
val allowsAnyHost: Boolean Allow requests from any origin |
|
Prefix for permitted headers |
|
val methods: Set<HttpMethod> All allowed HTTP methods |
Functions
suspend fun intercept( Feature’s call interceptor that does all the job. Usually there is no need to install it as it is done during feature installation |
Companion Object Properties
const val CORS_DEFAULT_MAX_AGE: Long The default CORS max age value |
|
val key: AttributeKey<CORS> Unique key that identifies a feature |
Companion Object Functions
fun install( Feature installation script |