Magento 2 - varnish + cloudflare

Hello,

i’m new to the community and have tried searching for my specific problem but i could not find anything related.
we have a magento 2 site with varnish and it’s working fine, and we’ve also been using cloudflare for some time.

recently we upgraded to pro, because i want to use the polish feature in cloudflare.

since activating it i’ve been waiting to see it in action but it doesn’t appear to be working, it seems like varnish is giving no-cache headers to my images and therefor cloudflare skips it.

anyone else that has experience in how to fix this issue ?

url: https://www.hakpro.nl/bakwanden

1 Like

Hi there,

So Polish is working on some of your images:

You can see the cf-polished header there. Note that Polish can only run when the image is in our cache - e.g. cf-cache-status: HIT.

So, you will need to modify your origin server or varnish server to return headers that allow us to cache the images: