2011/6/20 <[email protected]>:
> Hi,
> this is my configuration, thanks~
> backend www {
> .host = "xx.xx.xx.xx";
> .port = "80";
> .connect_timeout = 60s;
> .first_byte_timeout = 10s;
> .between_bytes_timeout = 5s;
> }
> sub vcl_recv {
> if ( req.http.host ~ "^xxx.com") {
> set req.backend = www;
> }
> else
> {
> error 404 "not allowed hostname";
> }
> if (req.request == "GET" && req.url ~
> "\.(js|css|jpg|png|gif|swf|jpeg|ico)$") {
> unset req.http.cookie;
> }
So there you go, you are in fact stripping cookies
>
> if (req.request == "GET" && req.url !~ "/images/captcha\.gif" &&
> (req.url ~ ".(js|css|jpg|png|gif|swf|jpeg|ico)$" || req.url ~ "/images/.*"
> || req.url ~ "/files/.*" || req.url ~ "/javascripts/.*" || req.url ~
> "/stylesheets/.*" || req.url ~ "^/gwt/.*" ) ) {
> lookup;
> }
Depending on which request you're testing with, you may be hitting
this, or falling through the end of the proc and hitting the default
logic (which will do the lookup anyway).
So to summarize, you are stripping cookies, and you are caching
images. It seems you are already doing what you wanted to do?
_______________________________________________
varnish-dev mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev