实现双授权系统:支持FACTORY_API_KEY环境变量优先级和客户端授权回退机制
- 新增FACTORY_API_KEY环境变量支持(最高优先级) - 保留现有refresh token自动刷新机制 - 添加客户端authorization头作为fallback - 优化启动流程,无认证配置时不报错退出 - 更新所有端点支持新的授权优先级系统 - 修改GPT-5-Codex推理级别为off
This commit is contained in:
@@ -110,7 +110,8 @@ app.use((err, req, res, next) => {
|
||||
logInfo('Configuration loaded successfully');
|
||||
logInfo(`Dev mode: ${isDevMode()}`);
|
||||
|
||||
// Initialize auth system (load and refresh API key)
|
||||
// Initialize auth system (load and setup API key if needed)
|
||||
// This won't throw error if no auth config is found - will use client auth
|
||||
await initializeAuth();
|
||||
|
||||
const PORT = getPort();
|
||||
|
||||
Reference in New Issue
Block a user