diff --git a/packages/mitmproxy/src/utils/util.match.js b/packages/mitmproxy/src/utils/util.match.js index 29db2db..f922add 100644 --- a/packages/mitmproxy/src/utils/util.match.js +++ b/packages/mitmproxy/src/utils/util.match.js @@ -2,6 +2,10 @@ const lodash = require('lodash') const log = require('./util.log') function isMatched (url, regexp) { + if (regexp === true || regexp === 'true') { + return true + } + try { let urlRegexp = regexp if (regexp[0] === '*' || regexp[0] === '?' || regexp[0] === '+') { @@ -15,7 +19,7 @@ function isMatched (url, regexp) { } function domainRegexply (target) { - if (target === '.*') { + if (target === '.*' || target === '*' || target === 'true') { return '^.*$' } return '^' + target.replace(/\./g, '\\.').replace(/\*/g, '.*') + '$'