Enumeration Casevapor 4.114.1Vapor
all
Uses wildcard to allow any origin.
case all
Uses wildcard to allow any origin.
case all
s5Vapor14CORSMiddlewareC18AllowOriginSettingO3allyA2EmF
What are these?7IK7R
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
enum AllowOriginSetting
Option for the allow origin header in responses for CORS requests.
final class CORSMiddleware
Middleware that adds support for CORS settings in request responses. For configuration of this middleware please use the CORSMiddleware.Configuration
object.
case none
Disallow any origin.
case originBased
Uses value of the origin header in the request.
case any([String])
A list of allowable origins.
case custom(String)
Uses custom string provided as an associated value.