/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-callback-9473c7db5051-callback-s0495-c0000.md
Callback - hono-docs
Callback Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt callback Summary If you want to add Basi...
Callback
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#callback
Summary
If you want to add Basic Auth and continue with request processing after verification, you can use c.env.callback() ```ts import { Hono } from 'hono' import { basicAuth } from 'hono/basic-auth' import type { Callback, CloudFrontRequest...
Content
If you want to add Basic Auth and continue with request processing after verification, you can use c.env.callback()
import { Hono } from 'hono'
import { basicAuth } from 'hono/basic-auth'
import type { Callback, CloudFrontRequest } from 'hono/lambda-edge'
import { handle } from 'hono/lambda-edge'
type Bindings = {
callback: Callback
request: CloudFrontRequest
}
const app = new Hono<{ Bindings: Bindings }>()
app.get(
'*',
basicAuth({
username: 'hono',
password: 'acoolproject',
})
)
app.get('/', async (c, next) => {
await next()
c.env.callback(null, c.env.request)
})
export const handler = handle(app)