白名单为空时全部放行

pull/85/head
hunshcn 2022-07-24 14:40:50 +08:00 committed by GitHub
parent 2dd775e152
commit 4d1ac0a5f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ function httpHandler(req, pathname) {
const reqHdrNew = new Headers(reqHdrRaw)
let urlStr = pathname
let flag = Boolean(whiteList.length)
let flag = !Boolean(whiteList.length)
for (let i of whiteList) {
if (urlStr.includes(i)) {
flag = true