Skip to content

Instantly share code, notes, and snippets.

@section-io-gists
Created July 2, 2015 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save section-io-gists/8ea78c06271d7e824431 to your computer and use it in GitHub Desktop.
Save section-io-gists/8ea78c06271d7e824431 to your computer and use it in GitHub Desktop.
section.io VCL - Normalise Accept Encoding
#section.io VCL sample. Copy paste into your section.io account to implement instantly
#vcl_recv - copy this code into the section called sub vcl_recv
if (req.http.Accept-Encoding) {
if (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} else if (req.http.Accept-Encoding ~ "deflate") {
set req.http.Accept-Encoding = "deflate";
} else {
unset req.http.Accept-Encoding;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment