Skip to content

Instantly share code, notes, and snippets.

@clkao
Created June 16, 2010 14:32
Show Gist options
  • Save clkao/440781 to your computer and use it in GitHub Desktop.
Save clkao/440781 to your computer and use it in GitHub Desktop.
backend b1 {
.host = "127.0.0.1";
.port = "8028";
}
backend hippie {
.host = "127.0.0.1";
.port = "8018";
}
sub vcl_recv {
# Add a unique header containing the client address
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = req.http.rlnclientipaddr;
# grace settings, note this is also set in vcl_fetch,
set req.grace = 600s;
if (req.url ~ "/_hippie/") {
set req.backend = hippie;
}
else {
set req.backend = b1;
}
pipe;
}
sub vcl_pipe {
set bereq.http.upgrade = req.http.upgrade;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment