Created
June 7, 2014 06:45
-
-
Save kaiinui/9036689160ff6f8d7f71 to your computer and use it in GitHub Desktop.
add content-type in Varnish/S3. placehold fix since S3 doesn't set Cache-Control and proper Content-type
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_fetch { | |
remove beresp.http.Cache-Control; | |
set beresp.http.Cache-Control = "public, max-age=31600000"; | |
if (req.url ~ ".jpg$") { | |
set beresp.http.content-type = "image/jpeg"; | |
} | |
if (req.url ~ ".webp$") { | |
set beresp.http.content-type = "image/webp"; | |
} | |
return(deliver); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment