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