-
Notifications
You must be signed in to change notification settings - Fork 14
CORSMiddleware_AllowOriginSetting
Josh Wright edited this page Jan 14, 2021
·
3 revisions
Option for the allow origin header in responses for CORS requests.
public enum AllowOriginSetting
-
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.
Disallow any origin.
case none
Uses value of the origin header in the request.
case originBased
Uses wildcard to allow any origin.
case all
A list of allowable origins.
case any(: [String])
Uses custom string provided as an associated value.
case custom(: String)
Creates the header string depending on the case of self.
public func header(forRequest req: Request) -> String
- request: Request for which the allow origin header should be created.
Header string to be used in response for allowed origin.
Generated at 2021-01-13T22:24:59-0800 using swift-doc 1.0.0-beta.5.
Alchemy
Types
- AlterTableBuilder
- BCryptDigest
- BasicAuthMiddleware
- BcryptError
- BelongsToRelationship
- CORSMiddleware
- CORSMiddleware.AllowOriginSetting
- CORSMiddleware.Configuration
- ColumnType
- CreateColumn
- CreateColumnBuilder
- CreateIndex
- CreateTableBuilder
- DatabaseConfig
- DatabaseError
- DatabaseField
- DatabaseKeyMappingStrategy
- DatabaseValue
- DayUnit
- Env
- FrequencyTyped
- Grammar
- HTTPAuth
- HTTPAuth.Basic
- HTTPAuth.Bearer
- HTTPBody
- HTTPError
- HasManyRelationship
- HasOneRelationship
- HasRelationship
- HourUnit
- JoinClause
- JoinType
- Launch
- Log
- MIMEType
- MinuteUnit
- ModelQuery
- MySQLDatabase
- Operator
- OrderClause
- OrderClause.Sort
- OrderedDictionary
- PapyrusClientError
- PathParameter
- PathParameter.DecodingError
- PostgresDatabase
- Query
- Request
- Response
- Router
- RuneError
- SQL
- SQLJSON
- Scheduler
- Schema
- SecondUnit
- Services
- Socket
- StaticFileMiddleware
- StringLength
- Thread
- TokenAuthMiddleware
- WeekUnit
- Weekday
- WhereBoolean
- WhereColumn
- WhereIn
- WhereIn.InType
- WhereNested
- WhereRaw
- WhereValue