cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
20.21k stars 1.1k forks source link

Fixes #233 – Set `Vary` response header when compression is enabled #286

Open palant opened 2 weeks ago

palant commented 2 weeks ago

See #229 and #233 for the rationale behind these changes.

The Vary insertion logic might be a bit overzealous, it will insert the header even if upstream produced an encoding that we cannot decompress. This is a rather unlikely scenario however, and having this Vary header won’t hurt.