Skip to content

Commit

Permalink
bugfix: 当某个域名未配置拦截配置,但启动了彩蛋功能时,彩蛋功能失效的问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Oct 17, 2024
1 parent 7584fed commit b8945e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/mitmproxy/src/lib/proxy/middleware/overwall.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ function createOverwallMiddleware (overWallConfig) {
if (ret == null) {
return null // 返回 null,由下一个拦截器校验
}
if (ret === false) {
return false // 不拦截,预留这个判断,避免以后修改 matched 方法的代码出BUG
}
return true // 拦截
},
requestIntercept (context, req, res, ssl, next) {
Expand All @@ -161,7 +164,7 @@ function createOverwallMiddleware (overWallConfig) {
}
const hostname = rOptions.hostname
const matchedResult = matched(hostname, overWallTargetMap)
if (matchedResult == null) {
if (matchedResult == null || matchedResult === false) {
return
}
const cacheKey = '__over_wall_proxy__'
Expand Down

0 comments on commit b8945e3

Please sign in to comment.