class CORS
CORS feature. Please read http://ktor.io/servers/features/cors.html first before using it.
class Configuration
CORS feature configuration |
|
companion object Feature : ApplicationFeature<ApplicationCallPipeline, Configuration, CORS>
Feature object for installation |
CORS(configuration: Configuration)
CORS feature. Please read http://ktor.io/servers/features/cors.html first before using it. |
val allHeaders: Set<String>
All allowed headers to be sent including simple |
|
val allHeadersSet: Set<String>
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 |
|
val headerPredicates: List<(String) -> Boolean>
Prefix for permitted headers |
|
val methods: Set<HttpMethod>
All allowed HTTP methods |
suspend fun intercept(context: PipelineContext<Unit, ApplicationCall>): Unit
Feature's call interceptor that does all the job. Usually there is no need to install it as it is done during feature installation |
const val CORS_DEFAULT_MAX_AGE: Long
The default CORS max age value |
|
val key: AttributeKey<CORS>
Unique key that identifies a feature |
fun install(pipeline: ApplicationCallPipeline, configure: Configuration.() -> Unit): CORS
Feature installation script |