合并dify代码

This commit is contained in:
2025-12-08 09:32:52 +08:00
parent 5f9ce2fe9f
commit d05c3cfa16
3 changed files with 13 additions and 13 deletions
+7 -7
View File
@@ -121,15 +121,15 @@ const portConfigs: Record<string, Partial<ApiConfig>> = {
const configs: Record<string, ApiConfig> = {
// 开发环境
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服务器地址
+5 -5
View File
@@ -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) {
+1 -1
View File
@@ -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