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

Commit

Permalink
perf(static): declare static files to be immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Apr 24, 2019
1 parent c995533 commit f0369b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/fastly/helix.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ sub hlx_fetch_static {
# check for hard-cached files like /foo.js.hlx_f7c3bc1d808e04732adf679965ccc34ca7ae3441
if (req.http.X-Orig-URL ~ "^(.*)(.hlx_([0-9a-f]){20,40}$)") {
# tell the browser to keep them forever
set beresp.http.Cache-Control = "max-age=31622400"; # keep it for a year in the browser;
set beresp.http.Cache-Control = "max-age=31622400,immutable"; # keep it for a year in the browser;
set beresp.http.Surrogate-Control = "max-age=3600"; # but only for an hour in the shared cache
# to limit cache poisioning
set beresp.cacheable = true;
Expand Down

0 comments on commit f0369b7

Please sign in to comment.