From 00e0dbbf98347b1e47a7e0aedd41baa61f7567ed Mon Sep 17 00:00:00 2001
From: fuyongxin <110568259@qq.com>
Date: Wed, 03 Jun 2026 08:47:03 +0800
Subject: [PATCH] 修改配置nacos,后端gateway端口
---
ruoyi-ui/src/utils/validate.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ruoyi-ui/src/utils/validate.js b/ruoyi-ui/src/utils/validate.js
index 13b7a15..fddf7ac 100644
--- a/ruoyi-ui/src/utils/validate.js
+++ b/ruoyi-ui/src/utils/validate.js
@@ -5,7 +5,12 @@
* @returns {Boolean}
*/
export function isPathMatch(pattern, path) {
- const regexPattern = pattern.replace(/\//g, '\\/').replace(/\*\*/g, '.*').replace(/\*/g, '[^\\/]*')
+ const regexPattern = pattern
+ .replace(/([.+^${}()|\[\]\\])/g, '\\$1')
+ .replace(/\*\*/g, '__DOUBLE_STAR__')
+ .replace(/\*/g, '[^/]*')
+ .replace(/__DOUBLE_STAR__/g, '.*')
+ .replace(/\?/g, '[^/]')
const regex = new RegExp(`^${regexPattern}$`)
return regex.test(path)
}
--
Gitblit v1.9.3