Skip to content

Commit 0b1a949

Browse files
committed
feat: allow internal requests
Signed-off-by: binaryYuki <60097976+binaryYuki@users.noreply.github.com>
1 parent d8d81a2 commit 0b1a949

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ async def check_cdn(request: Request, call_next):
245245
"""
246246
if request.headers.get("Cf-Ray") or request.headers.get("Eagleeye-Traceid"):
247247
return await call_next(request)
248+
elif request.headers.get("X-Via") == "internal":
249+
return await call_next(request)
248250
else:
249251
return JSONResponse(content={"status": "error", "error": "Direct access not allowed"}, status_code=403)
250252

0 commit comments

Comments
 (0)