Was getting errors when trying to post with full description, so I have added it here instead:
Looked up all things related to Cloudflare, CORS header ‘Access-Control-Allow-Origin’ missing, and CORS Middleware for my FastAPI backend.
My frontend, registered to the playlistmoodevaluator.com domain on Cloudflare, routes to a React CRA-based app hosted on Render.
My backend, registered to the api.playlistmoodevaluator.com subdomain on Cloudflare, routes to a FastAPI python backend hosted on Fly.io.
I ensured that my backend is configured to accept requests from my frontend, like so:
As you can see in the screenshot attached below, this exact origin (https://playlistmoodevaluator.com), is expected by my backend’s Middleware and should be accepted.
This process was working until I registered my domain with Cloudflare and started routing my traffic through my new domain.