CORSConfig
A configuration for the io.ktor.server.plugins.cors.routing.CORS plugin.
Constructors
Types
Functions
Allows using headers prefixed with headerPrefix for the actual CORS request.
Allows requests from the specified domains and schemes. A wildcard is supported for either the host or any subdomain. If you specify a wildcard in the host, you cannot add specific subdomains. Otherwise, you can mix wildcard and non-wildcard subdomains as long as the wildcard is always in front of the domain, e.g. *.sub.domain.com
but not sub.*.domain.com
.
Allows using the X-Http-Method-Override
header for the actual CORS request.
Allows exposing the header using Access-Control-Expose-Headers
. The Access-Control-Expose-Headers
header adds the specified headers to the allowlist that JavaScript in browsers can access.