Skip to content

Commit

Permalink
[VCL] Port changes from meta repo VCL for platform.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Mar 13, 2020
1 parent 9191c4a commit faf9bbd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/varnish/vcl/varnish5.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,19 @@ sub vcl_backend_response {

// Make Varnish keep all objects for up to 1 hour beyond their TTL, see vcl_hit for Request logic on this
set beresp.grace = 1h;

// Compressing the content
if (beresp.http.Content-Type ~ "application/javascript"
|| beresp.http.Content-Type ~ "application/json"
|| beresp.http.Content-Type ~ "application/vnd.ms-fontobject"
|| beresp.http.Content-Type ~ "application/vnd.ez.api"
|| beresp.http.Content-Type ~ "application/x-font-ttf"
|| beresp.http.Content-Type ~ "image/svg+xml"
|| beresp.http.Content-Type ~ "text/css"
|| beresp.http.Content-Type ~ "text/plain"
) {
set beresp.do_gzip = true;
}
}

// Handle purge
Expand Down

0 comments on commit faf9bbd

Please # to comment.