diff --git a/assistant/src/services/proxy/proxy-page-index.ts b/assistant/src/services/proxy/proxy-page-index.ts index 2fc5e1a..1b6be22 100644 --- a/assistant/src/services/proxy/proxy-page-index.ts +++ b/assistant/src/services/proxy/proxy-page-index.ts @@ -48,10 +48,10 @@ const authFilter = async (req: http.IncomingMessage, res: http.ServerResponse) = return { code: 200, message: '允许访问首页' }; } // 放开api, 以 /api, /v1, /client, /serve 开头的请求 - const openApiPaths = ['/api', '/v1', '/client', '/serve', '/proxy']; + const openApiPaths = ['/api', '/v1', '/client', '/serve', '/proxy', '/root']; for (const openPath of openApiPaths) { if (pathname.startsWith(openPath)) { - return { code: 200, message: '允许访问API' }; + return { code: 200, message: '允许公共访问模块' }; } } if (share === 'public') { @@ -65,7 +65,6 @@ const authFilter = async (req: http.IncomingMessage, res: http.ServerResponse) = return { code: 500, message: '未登录' }; } const tokenUser = await getTokenUserCache(token); - console.log('authFilter tokenUser', tokenUser, token); if (share === 'protected' && tokenUser?.code === 200) { return { code: 200, message: '受保护模式已登录允许访问' }; }