From 0eaf027001222848cd94fdec9f744ec4fc3e355c Mon Sep 17 00:00:00 2001 From: Lars Trieloff Date: Mon, 29 Apr 2019 09:29:40 +0200 Subject: [PATCH] fix(static): enable compression for ESI-processed resources --- layouts/fastly/helix.vcl | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/fastly/helix.vcl b/layouts/fastly/helix.vcl index a92edfba..769b212c 100644 --- a/layouts/fastly/helix.vcl +++ b/layouts/fastly/helix.vcl @@ -549,6 +549,7 @@ sub hlx_fetch_static { set req.esi = true; esi; set beresp.http.X-ESI = "processed(" + bereq.http.Accept-Encoding + ", " + req.esi + "," + req.http.X-From-Edge +")"; + `set beresp.http.x-compress-hint = "on";` // so h2o compresses it on the way out set beresp.http.Cache-Control = "max-age=31622400,immutable"; # keep it for a year in the browser; set beresp.http.Surrogate-Control = "max-age=31622400,immutable"; set beresp.cacheable = true;