Expiration header not being set?

Ilan Berkner iberkner at gmail.com
Sat Feb 19 02:49:58 MSK 2011


The location snippet below works except the expiration header is not being
set.  The request is made using this kind of URL:

/assets/abcdef/js/my.js

If the JS file is not found in memcached, it gets redirected to static.php
which loads the static file into memory.  Do we need to include the headers
in the file itself as its being loaded from memcached?

location ~ /assets/([a-zA-Z0-9]+)(/.+) {
                expires max;
                set $memcached_key "$1_$2";
                memcached_pass     localhost:11211;
                error_page         404 =200
/libraries/asset_filter/client/static.php?hash=$1&uri=$2;
}

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110218/fc0228cb/attachment.html>


More information about the nginx mailing list