Next.js SDK for Unkey
withUnkey
handler:
withUnkey
processes incoming requests, you can do so as follows:
getKey
authorization
header. If you want to customize this, you can do so by passing a getter
in the configuration object:
onError
withUnkey
will return a NextResponse with status 500.
handleInvalidKey