CORS Issues: PUT Requests Failing with Axios
I made two tunnels responsible for the frontend (NEXT) and backend (API - fastify).
The site works normally except for the PUT request from axios used to update the data.
I then receive an error:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
If I give access for everyone it works normally.
1 Reply
You mean your backend is protected by Access and you're having issues with CORS? You can configure it on the Settings page of your Application to avoid those issues: https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/cors/, either hardcoded values or making OPTIONS request bypass Access and go to origin