Enumeration
CORSMiddleware.AllowOriginSetting
Option for the allow origin header in responses for CORS requests.
enum AllowOriginSetting
Overview
none: Disallows any origin.
originBased: Uses value of the origin header in the request.
all: Uses wildcard to allow any origin.
any: A list of allowable origins.
custom: Uses custom string provided as an associated value.
Topics
Enumeration Cases
CORSMiddleware.AllowOriginSetting.allUses wildcard to allow any origin.CORSMiddleware.AllowOriginSetting.any(_:)A list of allowable origins.CORSMiddleware.AllowOriginSetting.custom(_:)Uses custom string provided as an associated value.CORSMiddleware.AllowOriginSetting.noneDisallow any origin.CORSMiddleware.AllowOriginSetting.originBasedUses value of the origin header in the request.
Instance Methods
header(forRequest:)Creates the header string depending on the case of self.
Type Methods
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype