Skip to content

Instantly share code, notes, and snippets.

@eterps
Last active Aug 29, 2015
Embed
What would you like to do?
backend s3 { .host = "s3.amazonaws.com"; .port = "80"; }
sub vcl_recv {
if (req.url ~ ".(css|gif|ico|jpg|jpeg|js|png|swf|txt)$") {
unset req.http.cookie;
unset req.http.cache-control;
unset req.http.pragma;
unset req.http.expires;
unset req.http.etag;
unset req.http.X-Forwarded-For;
set req.backend = s3;
set req.http.host = "my_bucket.s3.amazonaws.com";
lookup;
}
}
sub vcl_fetch {
unset obj.http.X-Amz-Id-2;
unset obj.http.X-Amz-Meta-Group;
unset obj.http.X-Amz-Meta-Owner;
unset obj.http.X-Amz-Meta-Permissions;
unset obj.http.X-Amz-Request-Id;
set obj.ttl = 1w;
set obj.grace = 30s;
}
@eterps

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment