CorsOptions class
CORS options to configure _Cors
Interceptor
Constructors
-
CorsOptions({bool allowAllOrigins = false, List<
String> ? allowedOrigins = const [], bool allowCredentials = false, bool allowAllMethods = false, List<String> allowedMethods = const ['GET', 'POST'], bool allowAllHeaders = false, List<String> allowedHeaders = const [], bool exposeAllHeaders = false, List<String> exposeHeaders = const [], int? maxAge, bool vary = false, dynamic allowNonCorsRequests = true}) -
const
Properties
- allowAllHeaders → bool
-
Allow all headers
final
- allowAllMethods → bool
-
Allow all methods
final
- allowAllOrigins → bool
-
Allow all origins
final
- allowCredentials → bool
-
Indicates whether the request can include user credentials like cookies,
HTTP authentication or client side SSL certificates
final
-
allowedHeaders
→ List<
String> -
The HTTP request headers that are allowed
final
-
allowedMethods
→ List<
String> -
The list of HTTP methods that are allowed
final
-
allowedOrigins
→ List<
String> ? -
The list of origins a cross-domain request can be executed from.
final
- allowNonCorsRequests → dynamic
-
final
- exposeAllHeaders → bool
-
Expose all headers
final
-
exposeHeaders
→ List<
String> -
The HTTP response headers that shall be exposed to the client application
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxAge → int?
-
The maximum time (in seconds) to cache the preflight response
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- vary → bool
-
final
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