Skip to content

Commit 33e4ed6

Browse files
committed
Increase allowed resource size to 15MB
1 parent d46ff99 commit 33e4ed6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/processSnapshot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { scrollToBottomAndBackToTop, getRenderViewports } from "./utils.js"
33
import { chromium, Locator } from "@playwright/test"
44
import constants from "./constants.js";
55

6-
const MAX_RESOURCE_SIZE = 10 * (1024 ** 2); // 10MB
6+
const MAX_RESOURCE_SIZE = 15 * (1024 ** 2); // 15MB
77
var ALLOWED_RESOURCES = ['document', 'stylesheet', 'image', 'media', 'font', 'other'];
88
const ALLOWED_STATUSES = [200, 201];
99
const REQUEST_TIMEOUT = 10000;
@@ -50,7 +50,7 @@ export default async (snapshot: Snapshot, ctx: Context): Promise<Record<string,
5050
} else if (cache[requestUrl]) {
5151
ctx.log.debug(`Handling request ${requestUrl}\n - skipping already cached resource`);
5252
} else if (body.length > MAX_RESOURCE_SIZE) {
53-
ctx.log.debug(`Handling request ${requestUrl}\n - skipping resource larger than 5MB`);
53+
ctx.log.debug(`Handling request ${requestUrl}\n - skipping resource larger than 15MB`);
5454
} else if (!ALLOWED_STATUSES.includes(response.status())) {
5555
ctx.log.debug(`Handling request ${requestUrl}\n - skipping disallowed status [${response.status()}]`);
5656
} else if (!ALLOWED_RESOURCES.includes(request.resourceType())) {

0 commit comments

Comments
 (0)