fix(proxy): allow /api/jobs routes before auth gate
This commit is contained in:
parent
bd418a3fdb
commit
75f93976ef
5
proxy.ts
5
proxy.ts
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user