CloudFlare blocking CORS

I have an application A (example.com) where I am embedding another application B which is hosted in Cloudflare Pages(cloudflare-pages.dev). The ideal scenario is to see application B inside A; however, I am getting CORS error while doing so.

Upon adding an Access Policy in the teams where I am trying to set up the Access-Control-Allow-Origin as “Allow All”, I am getting an error mentioning Error configuring your application: access.api.error.invalid_cors_methods.

What could be the possible solution here?

For CORS you have to specify which methods to allow or to allow all methods.

2 Likes

Hi Judge,

Thank you. I was able to save it, however, I’m still getting CORS error. What could be the possible resolution here?

If you want to actually use CORS, you need to toggle it on that same page. I think the UI could be a bit clearer that it’s off by not allowing you to change those settings without toggling it on.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.