CorsOptions class final
CORS settings for GenkitRouter.serve and GenkitRouter.handleHttpRequest.
await genkit.serve(
cors: const CorsOptions(allowedOrigins: ['https://myapp.dev']),
);
Constructors
Properties
-
allowedHeaders
→ List<
String> -
Request headers browsers may send (
Access-Control-Allow-Headers).final -
allowedOrigins
→ List<
String> -
Origins allowed to call the server, e.g.
https://myapp.dev.final -
exposedHeaders
→ List<
String> -
Response headers browser code may read (
Access-Control-Expose-Headers).final - hashCode → int
-
The hash code for this object.
no setterinherited
- 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