Make quantifier not lazy
All checks were successful
Test, Build, Deploy / Test, Build, and Deploy (push) Successful in 56s
Test, Build, Deploy / Create Sentry Release (push) Successful in 6s

This commit is contained in:
2026-04-11 03:12:18 -04:00
parent 91ec421450
commit 95ab13775b

View File

@@ -39,7 +39,7 @@ async function initializePrisma(context: RequestContext) {
async function mxAndBypassCheck(context: RequestContext) { async function mxAndBypassCheck(context: RequestContext) {
if (!(await context.env.DATA.get("mx"))) return await context.next(); if (!(await context.env.DATA.get("mx"))) return await context.next();
const cookies = context.request.headers.get("cookie")?.split(/; *?/); const cookies = context.request.headers.get("cookie")?.split(/; */);
const isAPI = new URL(context.request.url).pathname.startsWith("/api"); const isAPI = new URL(context.request.url).pathname.startsWith("/api");
if (!cookies?.length || !cookies.find((c) => c.startsWith("mxb="))) { if (!cookies?.length || !cookies.find((c) => c.startsWith("mxb="))) {