Static resources expire headers not being applied


#1

In my /etc/nginx/common/locations.conf file I have the following:

Cache static files

location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf)$ { add_header “Access-Control-Allow-Origin” “*”; access_log off; log_not_found off; expires max; }

Of course locations.conf is added in each server block as follows:

include common/locations.conf;

However, curl -I does not show this header. I have tried adding the header directly to the server blocks which shouldn’t make a difference and it doesn’t. Any ideas as to why the header is MIA?


#2