From a25199eb347f07d516ae7c27f6babb17790ee106 Mon Sep 17 00:00:00 2001 From: Dream Hunter Date: Thu, 11 Dec 2025 22:18:20 +0800 Subject: [PATCH] fix: exclude telegram routes from x-custom-auth check (#780) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 --- worker/src/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/src/worker.ts b/worker/src/worker.ts index 2857e29f..7f2541b6 100644 --- a/worker/src/worker.ts +++ b/worker/src/worker.ts @@ -52,7 +52,7 @@ app.use('/*', async (c, next) => { // check header x-custom-auth const passwords = getPasswords(c); - if (!c.req.path.startsWith("/open_api") && passwords && passwords.length > 0) { + if (!c.req.path.startsWith("/open_api") && !c.req.path.startsWith("/telegram/") && passwords && passwords.length > 0) { const auth = c.req.raw.headers.get("x-custom-auth"); if (!auth || !passwords.includes(auth)) { return c.text(msgs.CustomAuthPasswordMsg, 401)