effect-io-ai

Package: @effect/platform
Module: HttpApiSecurity

HttpApiSecurity.apiKey

Create an API key security scheme.

You can implement some api middleware for this security scheme using HttpApiBuilder.middlewareSecurity.

To set the correct cookie in a handler, you can use HttpApiBuilder.securitySetCookie.

The default value for in is “header”.

Signature

declare const apiKey: (options: { readonly key: string; readonly in?: "header" | "query" | "cookie" | undefined; }) => ApiKey

Source

Since v1.0.0