From f36a56c46ebfd359113632b8519fcc5e636053d4 Mon Sep 17 00:00:00 2001 From: Dev M Date: Sun, 6 Sep 2026 03:56:28 +0000 Subject: [PATCH] fix(ci): iterate Set via Array.from in http guard --- src/lib/security/http.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/security/http.ts b/src/lib/security/http.ts index ad6c0cb3..b384e2ea 100644 --- a/src/lib/security/http.ts +++ b/src/lib/security/http.ts @@ -39,7 +39,7 @@ export function assertSameOrigin(req: Request): GuardResult { if (origin) { try { const o = new URL(origin); - const ok = [...allowed].some((a) => { + const ok = Array.from(allowed).some((a) => { try { const u = new URL(a); return u.host === o.host; @@ -94,4 +94,4 @@ export function guardExpensivePost(req: Request, keyPrefix = "api"): GuardResult /** Test helper — clear rate-limit buckets between unit tests. */ export function __resetRateLimitBucketsForTests(): void { buckets.clear(); -} +} \ No newline at end of file