Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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