diff --git a/src/middleware.ts b/src/middleware.ts index f435c76b..7117e38f 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -12,7 +12,8 @@ export async function middleware(request: NextRequest) { const origin = request.headers.get("origin") ?? ""; if (!process.env.ALLOWED_LIST_EDGE_CONFIG) { - throw new Error("NEXT_PUBLIC_EDGE_CONFIG is not set"); + console.error("ALLOWED_LIST_EDGE_CONFIG is not set"); + return NextResponse.next(); } const client = createClient(process.env.ALLOWED_LIST_EDGE_CONFIG); const allowedOriginsData = await client.get("allowed-origins");