[Solved]Trying to fetch a react-app (static site) from s3 public bucket inside CloudFlare worker.

Hey guys, it's been two days and I can't seem to fetch my react web app deployed in s3 using CloudFlare worker. 😭 Can someone help with the correct way to do it?

I'm stuck at this error 😢 , see the ss. It seems I am able to download html, css and js bundle but browser is not able to parse them.
So far I've tried these things:
- make sure the content-type is correct for all the assets i.e text/html, text/css and application/javascript by creating a new Response(response.text(), {...response, headers:myHeaders})
- return fetch(bucketUrl, originalRequest)
- bang my head on table, wall and bed
- scratch my head
- about to cry in the corner 😭

here's the route that triggers the worker. https://app.nrj.life

Please, if someone has done it guide me. 🙏
My goal is to fetch the react-app and redirect users to mydomain/subroute with that fetched content.
image.png
Web site created using create-react-app
Was this page helpful?