Cached image's files by Mime-Type

Stig Sandbeck Mathisen ssm at linpro.no
Mon Jan 14 09:14:31 CET 2008


Samuel Martin <samuel.martin at makina-corpus.com> writes:

> but this declaration in my vcl file doesn't working ::
>         if (req.http.header ~ "image*" ) {
>                lookup;
>         }
>
> contrary to ::
>         if (req.url ~ "\.(css|js|gif|jpg|png|jpeg)$") {
>                 lookup;
>         }
>
> How i must interprete this ? Is my syntax bad or other ?

You're trying to match the request headers to force a lookup, but the
request does not include a content-type header.  That's something
you'll find in the response headers.

-- 
Stig Sandbeck Mathisen, Linpro


More information about the varnish-test mailing list