• Resolved rodskagg

    (@rodskagg)


    We’re using Cloudflare and I’m noticing that none of the images are cached by Cloudflare, with the response having the header cf-cache-status: BYPASS. I have added the required snippet to our Nginx config, which sets Cache-Control “private” and have added the Cloudflare Zone ID and Token keys.

    Is this correct? Won’t the Cache-Control “private” make it so that Cloudflare will never cache these images? Can I remove the Cache-Control header?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @rodskagg,

    Thank you for your message.

    Please tell me whether you are using Cloudflare free version or paid version?

    If you are a Pro, Business or Enterprise Cloudflare’s customer, you will be able to use our plugin with active Cloudflare CDN Caching. For Cloudflare free plans, our plugin will disable Cloudflare CDN Caching (but images in WebP and AVIF format will be displayed correctly). The Cache-Control header will be set to private. This is because in the Cloudflare free plans does not support the Accept header (read more). Available “Vary for Images” in your Cloudflare plan is necessary to use Cloudflare CDN Caching when loading WebP and AVIF files.

    Best,
    Mateusz

    Thread Starter rodskagg

    (@rodskagg)

    We’re on a paid version, as far as I know. Does that mean that I can remove setting the Cache-Control header in our Nginx config?

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @rodskagg Yes, in this situation yes. However, please add your data to Cloudflare in the CDN Settings tab in the plugin settings.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cache-Control private and Cloudflare’ is closed to new replies.