CorsMiddleware class

Handles Cross-Origin Resource Sharing (CORS) headers.

Implemented types

Constructors

CorsMiddleware({String allowOrigin = '*', String allowMethods = 'GET, POST, PUT, PATCH, DELETE, OPTIONS', String allowHeaders = 'Origin, Content-Type, Accept, Authorization, X-Requested-With', String? exposeHeaders, bool allowCredentials = false, int? maxAge = 86400})

Properties

allowCredentials bool
final
allowHeaders String
final
allowMethods String
final
allowOrigin String
final
exposeHeaders String?
final
handler MiddlewareHandler
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
maxAge int?
final
name String
no setteroverride
priority MiddlewarePriority
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited