Skip to content

Commit e1768f9

Browse files
committed
chore: 把 /download 和 /measure 整进去了
1 parent 7d524c2 commit e1768f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/web.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def middleware(request: web.Request, handler: Any) -> web.Response:
9292
pass
9393
setattr(request, "custom_address", address)
9494
start = time.perf_counter_ns()
95-
if config.const.disallow_public_dashboard and not address in ALLOW_IP and all(not request.path.startswith(path) for path in WHITELIST_PATHS):
95+
if config.const.disallow_public_dashboard and not address in ALLOW_IP and not all(not request.path.startswith(path) for path in WHITELIST_PATHS):
9696
return await asyncio.create_task(special_response())
9797
resp: web.Response = None # type: ignore
9898
try:
@@ -122,8 +122,8 @@ async def special_response():
122122
FINDING_FILTER = "127.0.0.1"
123123
CHECK_PORT_SECRET = os.urandom(8)
124124
WHITELIST_PATHS = [
125-
"/download"
126-
"/measure"
125+
"/download/"
126+
"/measure/"
127127
]
128128
ALLOW_IP = [
129129
"127.0.0.1",

0 commit comments

Comments
 (0)