From a0b522cb96583028a9c209f04afdf6ba007d63ff Mon Sep 17 00:00:00 2001 From: FleetAdmiralJakob Date: Mon, 22 Jan 2024 20:36:06 +0100 Subject: [PATCH] fix: Fixed an error which caused the failing of the tests --- packages/api/src/trpc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/src/trpc.ts b/packages/api/src/trpc.ts index 34e6ab22..19af0fb0 100644 --- a/packages/api/src/trpc.ts +++ b/packages/api/src/trpc.ts @@ -125,7 +125,7 @@ const ratelimit = new Ratelimit({ prefix: "@upstash/ratelimit", }); -const EXCLUDED_IPS = env.UPSTASH_RATELIMITER_EXCLUDED_IPS.split(","); +const EXCLUDED_IPS = (env.UPSTASH_RATELIMITER_EXCLUDED_IPS ?? "").split(","); const rateLimitMiddleware = t.middleware(async ({ ctx, path, next }) => { const identifier = `${ctx.ip}:${path}`;