Structure
CORSMiddleware.Configuration
Configuration used for populating headers in response for CORS requests.
struct Configuration
Topics
Initializers
init(allowedOrigin:allowedMethods:allowedHeaders:allowCredentials:cacheExpiration:exposedHeaders:)Instantiate a CORSConfiguration struct that can be used to create aCORSConfigurationmiddleware for adding support for CORS in your responses.
Instance Properties
let allowCredentials: BoolIf set to yes, cookies and other credentials will be sent in the response for CORS request.let allowedHeaders: StringHeader string containing headers that are allowed in a response for CORS request.let allowedMethods: StringHeader string containing methods that are allowed for a CORS request response.let allowedOrigin: CORSMiddleware.AllowOriginSettingSetting that controls which origin values are allowed.let cacheExpiration: Int?Optionally sets expiration of the cached pre-flight request. Value is in seconds.let exposedHeaders: String?Headers exposed in the response of pre-flight request.
Type Methods
static func `default`() -> CORSMiddleware.ConfigurationDefault CORS configuration.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype