Commit Graph
7 Commits
Author SHA1 Message Date
MarSeventh 0a0ca51e36 fix: use createResponse in huggingface upload endpoints to include CORS headers
Replace all new Response calls in commitUpload.js and getUploadUrl.js with
createResponse from uploadTools so that responses include Access-Control-Allow-Origin
and other CORS headers, fixing cross-origin requests.
2026-04-19 16:47:37 +08:00
MarSeventh 4d2796f54a refactor: unify auth logic into authCore with authScope parameter
- Extract shared authentication logic into utils/auth/authCore.js
- Replace enableBasicAuth/enableAuthCode flags with clear authScope enum (ADMIN/USER/EITHER)
- Move all auth-related files into utils/auth/ subdirectory
- Eliminate duplicated admin auth logic between _middleware.js and dualAuth.js
- Fix: user session no longer grants access to admin-only endpoints
- Fix: dualAuth no longer bypasses authCode when admin is not configured
- Update all 17 import references across the codebase
- Preserve original function signatures (userAuthCheck, dualAuthCheck) for zero caller changes
2026-04-18 13:24:53 +08:00
MarSeventh 2c1ff7241b 目录树设置和体验优化 2026-03-01 11:25:39 +08:00
MarSeventh 3dcf08e8b2 目录树设置和体验优化 2026-03-01 11:13:43 +08:00
MarSeventh 09c18cdf10 路径安全处理逻辑优化 2026-02-24 10:52:32 +08:00
MarSeventh 345ca37470 重建索引功能优化,提升安全性 2026-02-23 14:43:34 +08:00
MarSeventh bda782c141 hf渠道大文件上传优化 2026-02-23 13:44:49 +08:00