From 6064fe4ab10c4ab3ec5b09c5f4c65a0f0ff90e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Sun, 29 Sep 2024 11:30:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mitmproxy/src/utils/util.match.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mitmproxy/src/utils/util.match.js b/packages/mitmproxy/src/utils/util.match.js index 6d53b8f0..1120fe4c 100644 --- a/packages/mitmproxy/src/utils/util.match.js +++ b/packages/mitmproxy/src/utils/util.match.js @@ -2,7 +2,7 @@ const lodash = require('lodash') const log = require('./util.log') function isMatched (url, regexp) { - if (regexp === true || regexp === 'true' || regexp === '*' || regexp === '.*') { + if (regexp === '.*' || regexp === '*' || regexp === 'true' || regexp === true) { return url } @@ -19,7 +19,7 @@ function isMatched (url, regexp) { } function domainRegexply (target) { - if (target === '.*' || target === '*' || target === 'true') { + if (target === '.*' || target === '*' || target === 'true' || target === true) { return '^.*$' } return '^' + target.replace(/\./g, '\\.').replace(/\*/g, '.*') + '$'