Created
July 2, 2015 00:34
-
-
Save section-io-gists/8ea78c06271d7e824431 to your computer and use it in GitHub Desktop.
section.io VCL - Normalise Accept Encoding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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