Rewrite to work with Cloudflare