Created
May 9, 2017 19:16
-
-
Save rezan/2b7d1cfa40f40688cfc200e77678c190 to your computer and use it in GitHub Desktop.
Content-Length on all responses, this requests and stores both gzip and non gzip responses natively
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
sub vcl_hash | |
{ | |
if (req.url ~ "xxx") { | |
set req.http.X-Accept-Encoding = req.http.Accept-Encoding; | |
hash_data(req.http.Accept-Encoding); | |
} | |
} | |
sub vcl_backend_fetch | |
{ | |
if (req.url ~ "xxx") { | |
set bereq.http.Accept-Encoding = bereq.http.X-Accept-Encoding; | |
} | |
} | |
sub vcl_backend_deliver | |
{ | |
if (req.url ~ "xxx") { | |
set beresp.do_stream = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment