Cloudflare sends a response before the server

so I have an API when you send a post request it responds after 12 seconds with hi
I’ve tried it locally and it works
but when I deploy it a cors error appears but not for every request only for the 12-second request
the same request if I made it 3 seconds it won’t show the cors error
for some reason, Cloudflare is sending a response before I do with headers which causes
the error
I’ve tried everything and it didn’t work
any help?

Bump; anyone?

It sounds like you are getting blocked by CORS. There is an example worker here that will show what is needed.