更新依赖版本;重构代码以使用环境变量中的令牌;添加身份验证中间件以增强安全性

This commit is contained in:
xiongxiao
2026-03-22 02:03:52 +08:00
committed by cnb
parent c5a8d22249
commit c222a007c1
6 changed files with 51 additions and 15 deletions

View File

@@ -9,9 +9,9 @@ export const app = useContextKey("app", () => {
});
return app;
});
export const token = useKey("CNB_API_KEY") || useKey('CNB_TOKEN')
export const cnb = useContextKey("cnb", () => {
const token = useKey("CNB_API_KEY") || useKey('CNB_TOKEN')
return new CNB({ token });
});