Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions examples/playground14/e2e/cloudflare.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ test.describe("playground/cloudflare", () => {

test("400 when fetching an image disallowed by remotePatterns", async ({ page }) => {
const res = await page.request.get("/_next/image?url=https://avatars.githubusercontent.com/u/248817");
// The request should be blocked by either the remote patterns or the asset worker
const isBlockedByRemotePattern = res.status() === 400;
const isBlockedByAssetWorker = res.status() === 403;
expect(isBlockedByRemotePattern || isBlockedByAssetWorker).toBe(true);
expect(res.status()).toBe(400);
});
});

Expand Down
Loading