Vercel/CloudFlare CORS Error
# support
g
-I set up 2 servers , one on vercel and one on cloudflare (back up) and edited my assistant with the related URLs. Tried to access any of these functions with these servers = blocked by CORS issue : "Access to XMLHttpRequest at 'https://cloudflare-hono.workers.dev/api/webhook' from origin 'https://dashboard.vapi.ai' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource." -tried to update vercel.json but can not add due to routes definition any idea @nikhil ?
Update. I edited index.ts ### and cors.utils.ts: Now working (vercel)
p
Hi @GetInference Did you make any other changes besides the util change and the index for your webhook? I am getting the same error on my function (/api/functions/basic) for CORS, and have copied what you have but still getting issues. Interested to know if this issue came back for you.
n
Ask GPT4, it's usually pretty at these configuration things