Peter Griess
Sep 7, 2018 · 1 min read

Great article, Felice Geracitano!

Is it possible to set the HTTP ‘Vary: Accept-Encoding’ header in the response?

Without this, downstream HTTP caches may end serving the wrong content as they won’t know that it differs based on the Accept-Encoding header. Reading the CF docs, if the origin sends a Vary header back (and CF is configured to respect it when caching), CF will cache and proxy it back upstream. However this is sort of misleading since the origin itself is not actually varying the response based on anything other than the URL.

    Peter Griess

    Written by