Challenge 1
Send JSON without triggering Chrome's Blob throw or a preflight.
// safelisted, no-cors, no preflight:
navigator.sendBeacon(url, );
// server: JSON.parse(await req.text())
Press Ctrl⌘Enter to check your answer
Fill in the missing payload types that keep the derived Content-Type on the safelist.
Challenge 1
// safelisted, no-cors, no preflight:
navigator.sendBeacon(url, );
// server: JSON.parse(await req.text())
Press Ctrl⌘Enter to check your answer
Challenge 2
const body = new ({ event: 'pageview', id: 42 });
navigator.sendBeacon(url, body);
Press Ctrl⌘Enter to check your answer
Challenge 3
// switches the request to cors mode + preflight:
new Blob([json], { type: '' })
Press Ctrl⌘Enter to check your answer
Challenge 4
// derives a NON-safelisted Content-Type -> cors mode -> preflight
const payload = ;
Press Ctrl⌘Enter to check your answer
Challenge 5
// TypeError: length cannot be determined at queueing time
const stream = new ();
fetch(url, { method: 'POST', body: stream, keepalive: true });
Press Ctrl⌘Enter to check your answer