Hi, and merry Christmas!
I’m trying to render an image using JavaScript, but I run into CORS issues. Here is the context:
- I use Cloudflare Images with my custom domain (
domain.com/cdn-cgi/imagedelivery/
…). If I use that, it works fine, and I’m able to render/download the image client-side using JavaScript, since it use the same domain. - I wanted to have a URL looking nicer than that, so I made a page rule redirecting
image.domain.com/
… todomain.com/cdn-cgi/imagedelivery/
… - I added a DNS A record: Name: Image, Content: 8.8.8.8
- The image is accessible properly, but when I try to download it using JS, I run into a CORS issue.
What could I do to fix that?