1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Cache all javascript files with max expiry too

This commit is contained in:
Joseph Choi 2013-03-28 15:29:05 -03:00
parent 444c3c7dd7
commit cca93b3da8

View file

@ -53,7 +53,7 @@ server {
# rewite the url to have explicit .html on the end
# and then send it on its way to the next config rule.
# if there is no file on the fs then it sets all the
# necessary headers and proxies to our upstream mongrels
# necessary headers and proxies to our upstream pumas
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
@ -66,12 +66,7 @@ server {
# Now this supposedly should work as it gets the filenames with querystrings that Rails provides.
# BUT there's a chance it could break the ajax calls.
location ~* \.(ico|css|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
break;
}
location ~ ^/javascripts/.*\.js(\?[0-9]+)?$ {
location ~* \.(ico|css|gif|jpe?g|png|js)(\?[0-9]+)?$ {
expires max;
break;
}