All plugins not functioning due to CORS error after recent upgrade

I was having a hard time getting the CORS settings in Cloudflare R2 to work for this with a custom domain. I ended up brute forcing it by using a header transform rule to always insert the right header for my CDN domain. Just in case this helps someone else.