Skip to main content

require_auth

Function require_auth 

Source
pub async fn require_auth(request: Request, next: Next) -> Response
Expand description

Require a bearer token matching EMBACLE_API_KEY, when one is configured.

With no key set the server is in local development mode and every request passes, matching the behaviour of the OpenAI surface beside it.