bugfix: 当某个域名未配置拦截配置,但启动了彩蛋功能时,彩蛋功能失效的问题修复

pull/377/head v1.8.7
王良 2024-10-18 00:48:36 +08:00
parent 7584fed346
commit b8945e3768
1 changed files with 4 additions and 1 deletions

View File

@ -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) {
@ -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__'