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
allowCredentialsIf set to yes, cookies and other credentials will be sent in the response for CORS request.allowedHeadersHeader string containing headers that are allowed in a response for CORS request.allowedMethodsHeader string containing methods that are allowed for a CORS request response.allowedOriginSetting that controls which origin values are allowed.cacheExpirationOptionally sets expiration of the cached pre-flight request. Value is in seconds.exposedHeadersHeaders exposed in the response of pre-flight request.
Type Methods
default()Default CORS configuration.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype