Add Cache-Control back

This commit is contained in:
Thomas Sileo 2019-08-24 11:18:01 +02:00
parent a8d571f2a3
commit 2dcc7319ea

View file

@ -53,7 +53,7 @@ def build_resp(resp):
if "gzip" in accept_encoding.lower():
return (
gzip.compress(resp.encode(), compresslevel=6),
{"Vary": "Accept-Encoding", "Content-Encoding": "gzip"},
{**headers, "Vary": "Accept-Encoding", "Content-Encoding": "gzip"},
)
return resp, headers