I was trying to do the same thing to avoid CORS preflights, here are the options I came up with: 1.
I was trying to do the same thing to avoid CORS preflights, here are the options I came up with:
- Proxy the request using Workers
- Wait for Snippets GA (similar to Workers but free because of way less CPU time and memory etc., but probably plenty for forwarding API requests): https://developers.cloudflare.com/rules/snippets/
- Pay $XXXX for enterprise and use this origin rule: https://developers.cloudflare.com/rules/origin-rules/features/#dns-record
- Don't use Pages (e.g. use Nginx to serve the frontend yourself and proxy
/api/*) - Give up and use an API subdomain anyway




