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:
  1. Proxy the request using Workers
  2. 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/
  3. Pay $XXXX for enterprise and use this origin rule: https://developers.cloudflare.com/rules/origin-rules/features/#dns-record
  4. Don't use Pages (e.g. use Nginx to serve the frontend yourself and proxy /api/*)
  5. Give up and use an API subdomain anyway
Was this page helpful?