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
case allUses wildcard to allow any origin.case any([String])A list of allowable origins.case custom(String)Uses custom string provided as an associated value.case noneDisallow any origin.case originBasedUses value of the origin header in the request.
Instance Methods
func header(forRequest: Request) -> StringCreates the header string depending on the case of self.
Type Methods
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype