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

Commit

Permalink
fix(static): disable GZip for all backend requests that could contain…
Browse files Browse the repository at this point in the history
… ESI
  • Loading branch information
trieloff committed Apr 26, 2019
1 parent 3d60b7c commit 393ae0a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions layouts/fastly/helix.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -998,13 +998,9 @@ sub vcl_fetch {
}
}

if ( req.http.x-esi ) {
esi;
}

call hlx_fetch_static;

if (beresp.http.X-ESI) {
if (beresp.http.X-ESI == "enabled" || req.http.x-esi) {
esi;
}

Expand Down Expand Up @@ -1051,7 +1047,7 @@ sub hlx_bereq {
}

# making sure to get an uncompressed object for ESI
if ( req.url.ext == "html" ) {
if ( req.url.ext == "html" || req.url.ext == "js" || req.url.ext == "css" ) {
unset bereq.http.Accept-Encoding;
}

Expand Down

0 comments on commit 393ae0a

Please sign in to comment.