Skip to content

Instantly share code, notes, and snippets.

@andreferraro
Created July 23, 2015 05:41
Show Gist options
  • Save andreferraro/a7d38c0b13f2b553a269 to your computer and use it in GitHub Desktop.
Save andreferraro/a7d38c0b13f2b553a269 to your computer and use it in GitHub Desktop.
vcl 4.0;
backend default {
.host = "127.0.0.1";
.port = "8080";
}
# Configurações de performance
sub vcl_recv {
if (req.url ~ "(?i)\.(css|js|jpg|jpeg|gif|png|ico)(\?.*)?$") {
unset req.http.Cookie;
}
}
# Configuração de disponibilidade
sub vcl_backend_response {
set beresp.ttl = 10s;
set beresp.grace = 1h;
}
# IP na assinatura do Varnish / Remoção de assinatura do Varnish
sub vcl_deliver {
set resp.http.X-Server-IP = server.ip;
unset resp.http.Via;
unset resp.http.X-Varnish;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment