Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dev without allow list edge config #313

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading