Fix (dev): exclude healthcheck from auth (#6776)
Docker CI / Docker Build & Push (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled

This commit is contained in:
shamoon
2026-06-15 13:33:16 -07:00
committed by GitHub
parent 7cf9134c1f
commit 6f86b18005
3 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ export async function middleware(req) {
return NextResponse.json({ error: "Host validation failed. See logs for more details." }, { status: 400 });
}
if (authEnabled) {
if (authEnabled && !new URL(req.url).pathname.startsWith("/api/healthcheck")) {
const token = await getToken({ req, secret: authSecret });
if (!token) {
const signInUrl = new URL("/auth/signin", req.url);