Status 400 for method post using workers with code attached

What is wrong with this code that if you use with any wordpress sites, it will return status 400 for anything that has:


method POST with xhr

How do I resolve this?

addEventListener('fetch', event => {

async function handleRequest(request) {
  response = await fetch(request.url)
  return new Response(response.body,response)