Skip auth check on /healthz endpoint
Build Claw Telegram / build (push) Successful in 47s
Build Claw Telegram / cleanup (push) Successful in 0s

The gateway health check calls /healthz without auth headers.
Move the healthz route before the auth check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wylabb
2026-04-08 00:09:01 +02:00
parent 361b43cf47
commit ee247d0c92
+4 -4
View File
@@ -81,18 +81,18 @@ async function handleRequest(
req: Request,
state: WorkerState,
): Promise<Response> {
const authErr = checkAuth(req, state)
if (authErr) return authErr
const url = new URL(req.url)
const path = url.pathname
const method = req.method
// ── Health ────────────────────────────────────────────────────────
// ── Health (unauthenticated) ──────────────────────────────────────
if (method === 'GET' && path === '/healthz') {
return new Response('ok')
}
const authErr = checkAuth(req, state)
if (authErr) return authErr
// ── Status ────────────────────────────────────────────────────────
if (method === 'GET' && path === '/v1/status') {
const status: WorkerStatusResponse = {