Skip to content

Instantly share code, notes, and snippets.

@jaibeee
Last active August 29, 2015 14:08
Show Gist options
  • Save jaibeee/3f2429c294995c183d01 to your computer and use it in GitHub Desktop.
Save jaibeee/3f2429c294995c183d01 to your computer and use it in GitHub Desktop.
sub vcl_recv {
if (req.url ~ "^/api/*") {
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;
if (req.restarts == 0) {
set req.http.X - host = req.http.host;
set req.backend = s3;
set req.http.host = "tests3bucket.amazonaws.com";
return(lookup);
} else {
set req.backend = default;
set req.http.host = req.http.X - host;
return(lookup);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment