fix: 1.接入ai_suggestion.
2. 接入合同起草功能。
This commit is contained in:
+5
-5
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user