fix(proxy): allow /api/jobs routes before auth gate
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-03-05 12:21:03 +08:00
parent bd418a3fdb
commit 75f93976ef

View File

@ -141,6 +141,11 @@ export async function proxy(request: NextRequest) {
return NextResponse.next();
}
// 允许定时任务接口由服务端调用(具体鉴权由接口内部 CRON_SECRET 负责)
if (pathname.startsWith("/api/jobs/")) {
return NextResponse.next();
}
// 允许公开访问动态 favicon(浏览器标签图标)
if (pathname === "/api/favicon") {
return NextResponse.next();