Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Commit

Permalink
fix(static): enable compression for ESI-processed resources
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff authored Apr 29, 2019
1 parent 2729f64 commit 0eaf027
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions layouts/fastly/helix.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0eaf027

Please sign in to comment.