Skip to content

Commit

Permalink
Merge pull request #313 from skip-mev/feat/dev-without-allow-list-edg…
Browse files Browse the repository at this point in the history
…e-config

feat: dev without allow list edge config
  • Loading branch information
codingki authored Jul 1, 2024
2 parents cc7426e + 01fd530 commit c223336
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 c223336

Please sign in to comment.