Created
January 22, 2014 11:20
-
-
Save alch/8557113 to your computer and use it in GitHub Desktop.
Varnish simple configuration for symfony 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend default { | |
.host = "127.0.0.1"; | |
.port = "8081"; | |
} | |
sub vcl_recv { | |
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") { | |
unset req.http.cookie; | |
} | |
} | |
sub vcl_fetch { | |
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") { | |
unset beresp.http.set-cookie; | |
} | |
} | |
sub vcl_recv { | |
if (req.url ~ "^/images") { | |
unset req.http.cookie; | |
} | |
} | |
sub vcl_fetch { | |
if (req.url ~ "^/images") { | |
unset beresp.http.set-cookie; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment