We are using Cloudflare image resizing in workers to resize images on-demand. One of the sources is Shopify CDN (example:
It looks like Shopify is using Cloudflare as well, and for whatever reason, they are responding with a 403 when a fetch is made without the
cdn-loop header set in the request. Obviously, Cloudflare doesn’t allow to manually set that header, so what I’ve tried to do instead is repeat the
fetch request in hopes that Cloudflare would then set it to
cloudflare; subreqs=1, but that didn’t happen. if I just nest a normal
fetch without the
cf.image options (so without resizing), Cloudflare correctly sets the header.
I understand it’s not Cloudflare’s fault Shopify weirdly returns 403 when the header is not set, but I do wonder if it’s expected that Cloudflare workers are not setting the header for nested image resizing fetches (but they do for non-resizing requests)?