CORS

class CORS(configuration: CORS.Configuration)

CORS feature. Please read http://ktor.io/servers/features/cors.html first before using it.

Constructors

Link copied to clipboard
fun CORS(configuration: CORS.Configuration)

Types

Link copied to clipboard
class Configuration

CORS feature configuration

Link copied to clipboard

Feature object for installation

Functions

Link copied to clipboard
suspend fun intercept(context: PipelineContext<Unit, ApplicationCall>)

Feature's call interceptor that does all the job. Usually there is no need to install it as it is done during feature installation

Properties

Link copied to clipboard
val allHeaders: Set<String>

All allowed headers to be sent including simple

Link copied to clipboard
val allHeadersSet: Set<String>

Set of all allowed headers

Link copied to clipboard
val allowCredentials: Boolean

Allow to pass credentials

Link copied to clipboard
val allowSameOrigin: Boolean

Allow requests from the same origin

Link copied to clipboard
val allowsAnyHost: Boolean

Allow requests from any origin

Link copied to clipboard
val headerPredicates: List<(String) -> Boolean>

Prefix for permitted headers

Link copied to clipboard
val methods: Set<HttpMethod>

All allowed HTTP methods