Correct way to set CORS in Cloudflare Workers
I've been trying to set CORS headers following the docs but it doesn't seem to be working for me.
Error:
Access to fetch at 'http://127.0.0.1:8787/trpc/example.hello?batch=1&input=%7B%220%22%3A%7B%22json%22%3A%7B%22text%22%3A%22Yinka%22%7D%7D%7D' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
1 Reply
Thank you @Leo That worked
I added this line at the top of the function