Cloudflare

We just shipped support for the ugliest part of HTTP: Vary

Sep 22, 2026Alex Krivit, Zaidoon Abd Al Hadi
We just shipped support for the ugliest part of HTTP: Vary
SummaryAI, from the source post

This post introduces the implementation of `Vary` header support within Cloudflare's Cache Rules. It details how users can now control how Cloudflare handles request headers declared in the `Vary` response header by choosing between `normalize`, `passthrough`, and `bypass` actions for each header. The `normalize` action is recommended for negotiation headers like `Accept` and `Accept-Language`, while `passthrough` is for headers where exact values matter, and `bypass` is for high-cardinality or personalized headers like `Cookie` or `User-Agent`. The post also clarifies that `Vary: *` always bypasses cache. It explains the interaction between Cache Rules and the `Vary` header, noting that normalization occurs before origin contact and that the origin's `Vary` declaration determines which headers are considered for caching variants.

More from the Cache Management trail