From 3a35a10523f7204c22badbecf9abbc06ff01caa5 Mon Sep 17 00:00:00 2001 From: Dream Hunter Date: Sun, 21 Apr 2024 10:31:45 +0800 Subject: [PATCH] fix: RATE_LIMITER not call jwt (#146) --- worker/src/worker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/worker/src/worker.js b/worker/src/worker.js index 80467450..a8f8c964 100644 --- a/worker/src/worker.js +++ b/worker/src/worker.js @@ -30,9 +30,11 @@ app.use('/api/*', async (c, next) => { return c.text(`IP=${reqIp} Rate limit exceeded for ${c.req.path}`, 429) } } + } + if (c.req.path.startsWith("/api/new_address")) { await next(); return; - }; + } return jwt({ secret: c.env.JWT_SECRET })(c, next); });