Skip to content

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

Initializers

Instance Properties

  • configuration
    Configuration used for populating headers in response for CORS requests.

Instance Methods

Enumerations

Relationships

Conforms To

  • Middleware
  • Swift.Sendable
  • Swift.SendableMetatype