effect-io-ai

Package: @effect/platform
Module: HttpLayerRouter

HttpLayerRouter.cors

A middleware that applies CORS headers to the HTTP response.

Signature

declare const cors: (options?: { readonly allowedOrigins?: ReadonlyArray<string> | Predicate.Predicate<string> | undefined; readonly allowedMethods?: ReadonlyArray<string> | undefined; readonly allowedHeaders?: ReadonlyArray<string> | undefined; readonly exposedHeaders?: ReadonlyArray<string> | undefined; readonly maxAge?: number | undefined; readonly credentials?: boolean | undefined; } | undefined) => Layer.Layer<never, never, HttpRouter>

Source

Since v1.0.0