Cors class
CORS (Cross-Origin Resource Sharing) middleware.
Handles CORS headers for both preflight (OPTIONS) and actual requests. Supports static origin lists, dynamic origin callbacks, and various security options.
- Implemented types
Constructors
- Cors([CorsOptions options = const CorsOptions()])
-
Creates a CORS middleware with the given
options.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- options → CorsOptions
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
handle(
Context ctx, NextFunction next) → FutureOr< void> -
override
-
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