diff --git a/app/config/api-config.ts b/app/config/api-config.ts index 28c04c3..0fcaf46 100644 --- a/app/config/api-config.ts +++ b/app/config/api-config.ts @@ -121,15 +121,15 @@ const portConfigs: Record> = { const configs: Record = { // 开发环境 development: { - baseUrl: 'http://172.16.0.58:8073', // FastAPI后端(包含/dify代理) - documentUrl: 'http://172.16.0.58:8073/docauditai/', - uploadUrl: 'http://172.16.0.58:8073/admin/documents', - // baseUrl: 'http://172.16.0.55:8073', // FastAPI后端(包含/dify代理) - // documentUrl: 'http://172.16.0.55:8073/docauditai/', - // uploadUrl: 'http://172.16.0.55:8073/admin/documents', + // baseUrl: 'http://172.16.0.58:8073', // FastAPI后端(包含/dify代理) + // documentUrl: 'http://172.16.0.58:8073/docauditai/', + // uploadUrl: 'http://172.16.0.58:8073/admin/documents', + baseUrl: 'http://172.16.0.55:8073', // FastAPI后端(包含/dify代理) + documentUrl: 'http://172.16.0.55:8073/docauditai/', + uploadUrl: 'http://172.16.0.55:8073/admin/documents', collaboraUrl: 'http://172.16.0.81:9980', - appUrl: 'http://172.16.0.78:51703', + appUrl: 'http://172.16.0.34:5173', oauth: { serverUrl: 'http://10.79.112.85', // IDaaS服务器地址 diff --git a/app/root.tsx b/app/root.tsx index 6175996..f3d5c20 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -177,11 +177,11 @@ export async function loader({ request }: LoaderFunctionArgs) { // 检查当前路径是否在允许列表中 const isAllowedPath = isPathAllowed(pathname, allowedPaths); - // if (!isAllowedPath) { - // console.warn(`⚠️ [Root Loader] 用户尝试访问未授权路由: ${pathname}`); - // // 返回 403 错误,而不是 redirect(避免循环) - // throw new Response("无权访问此页面", { status: 403 }); - // } + if (!isAllowedPath) { + console.warn(`⚠️ [Root Loader] 用户尝试访问未授权路由: ${pathname}`); + // 返回 403 错误,而不是 redirect(避免循环) + throw new Response("无权访问此页面", { status: 403 }); + } } else { // 🔑 检查是否因为认证失败需要重定向到登录页 if (routesResult.shouldRedirectToHome) { diff --git a/vite.config.ts b/vite.config.ts index e4062cc..adc9e23 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -53,7 +53,7 @@ export default defineConfig({ server: { host: '0.0.0.0', // port: 5173, - port: Number(process.env.PORT) || 51703, + port: Number(process.env.PORT) || 5173, open: true, // open: false, allowedHosts: ['nas.7bm.co', 'localhost', '127.0.0.1'], // 允许的主机名列表1