Skip to content

Commit

Permalink
fix: cors preview url (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki authored Jul 18, 2024
1 parent 12c8a6d commit bbac510
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function middleware(request: NextRequest) {
if (isPreview(domain)) {
const allowedPreviewData = await client.get("preview-namespace");
const allowedPreview = await stringArraySchema.parseAsync(allowedPreviewData);
if (allowedPreview.find((d) => d.includes(domain))) {
if (allowedPreview.find((d) => domain.includes(d))) {
return true;
}
}
Expand Down

0 comments on commit bbac510

Please sign in to comment.