chore(debug): 本地开发跳过权限验证
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

前端 AuthProvider 注入测试用户(BI-SCHEDULE-OPT),后端 middleware BYPASS_AUTH=true。
仅用于本地调试,禁止合并回 main。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-05-14 16:06:56 +08:00
parent 69168abdf8
commit 0dc45504f2
2 changed files with 15 additions and 2 deletions

View File

@@ -5,7 +5,8 @@ import type { JwtPayload, AuthUser } from './types.js';
const JWT_SECRET = process.env.JWT_SECRET || 'ln-bi-default-secret';
// 临时:跳过所有认证(保留完整逻辑便于快速恢复)
const BYPASS_AUTH = false;
// 临时:本地开发跳过认证
const BYPASS_AUTH = true;
export async function authMiddleware(c: Context, next: Next) {
const path = c.req.path;