Hi there, I’m working on an app and I can’t seem to get cloudflare to work with it.
I’m running my frontend on an app engine service on a custom domain, let’s say it’s “https://frontend.mydomain.com”. Similarly, I’m running my backend on a cloud run service with a custom domain, they both have the same domain with different subdomains (consider the same as the frontend, but with backend instead) and HTTPS setup.
On my backend, I have these headers configured to be set:
“Access-Control-Allow-Credentials”: “true”
“Access-Control-Allow-Methods”: “GET, POST, PATCH, PUT, DELETE, OPTIONS”
“Access-Control-Allow-Headers”: “Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With,observe”
“Access-Control-Allow-Origin”: “https://frontend.mydomain.com”
Everything works fine without cloudflare, but when I try to use it, I get blocked by CORS: “No ‘Access-Control-Allow-Origin’ header is present on the requested resource”
What should I do to fix this?