We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9a2c48 commit 6b18332Copy full SHA for 6b18332
src/index.js
@@ -36,7 +36,7 @@ const defaultContext = {
36
const screenshotSchema = z.object({
37
url: z.string().url(),
38
theme: z.enum(["light", "dark"]).default("light"),
39
- headers: z.record(z.string(), z.any()),
+ headers: z.record(z.string(), z.any()).optional(),
40
sleep: z.number().min(0).max(60000).default(3000),
41
});
42
router.post(
@@ -59,7 +59,7 @@ router.post(
59
return await route.continue({
60
headers: {
61
...request.headers(),
62
- ...body.headers,
+ ...(body.headers || {}),
63
},
64
65
}
0 commit comments