Class
CORSMiddleware
Middleware that adds support for CORS settings in request responses. For configuration of this middleware please use the
CORSMiddleware.Configuration object.final class CORSMiddleware
Overview
Note
Make sure this middleware is inserted before all your error/abort middlewares, so that even the failed request responses contain proper CORS information.
Topics
Structures
CORSMiddleware.ConfigurationConfiguration used for populating headers in response for CORS requests.
Initializers
init(configuration:)Creates a CORS middleware with the specified configuration.
Instance Properties
configurationConfiguration used for populating headers in response for CORS requests.
Instance Methods
respond(to:chainingTo:)Called with eachRequestthat passes through this middleware.
Enumerations
CORSMiddleware.AllowOriginSettingOption for the allow origin header in responses for CORS requests.
Relationships
Conforms To
MiddlewareSwift.SendableSwift.SendableMetatype