Is it possible to bypass cache by sending Set-Cookie from the origin response?

The docs say:
" * Cloudflare does not cache the resource if the Cache-Control header is set to private , no-store , no-cache , or max-age=0 or if there is a cookie in the response."
also
"The Cloudflare CDN does not cache HTML by default. "

what if I have Magento with page rule set up:
https://support.cloudflare.com/hc/en-us/articles/236168808-Caching-Static-HTML-with-Magento-Business-and-Enterprise-only-
There is option “Bypass cache on cookie”. But the CF checks cookie from the request’s (client) side, not from the reponse (origin) side?

Is it possible to bypass the CF cache by sending private_content_version Cookie from the origin server? (I have origin header set to cache-control: no-store, no-cache, must-revalidate, max-age=0 (its default from Magento 2))
Or any other advice how to bypass the cache by the means of the origin server logic?
Do I need to create a custom worker?
Does such page rule overrides “Cloudflare does not cache the resource if … there is a cookie in the response.”? Does it still respect’s origin headers?

Here are some other options:
https://developers.cloudflare.com/cache/about/cdn-cache-control

@sdayman Can i use transform rules to bypass cache specially for woocommerce

Good question, and I’ve not tried. I suspect not. I think they’re both on the respectively wrong side of the cache. Request headers are what Cloudflare sends to the origin and I can’t imagine a way they’d impact Edge Caching, and Response headers are what Cloudflare sends to the browser as part of the cached payload.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.