Skip to content

Commit

Permalink
feat: dev without allow list edge config
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki committed Jul 1, 2024
1 parent 2a19ead commit 01fd530
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 01fd530

Please sign in to comment.