FIX: cache all public resources registered by plugins.

Plugins are responsible for expiry
This commit is contained in:
Sam 2014-12-09 14:49:02 +11:00
parent 51955e6e78
commit 5551676fef

View File

@ -58,7 +58,7 @@ server {
# further more etags are based on the file in nginx not sha of data
# use dates, it solves the problem fine even cross server
etag off;
# prevent direct download of backups
location ^~ /backups/ {
internal;
@ -79,9 +79,15 @@ server {
# asset pipeline enables this
gzip_static on;
add_header Cache-Control public;
# TODO I don't think this break is needed, it just breaks out of rewrite
break;
}
location ~ ^/plugins/ {
expires 1y;
add_header Cache-Control public;
}
location ~ ^/uploads/ {
# NOTE: it is really annoying that we can't just define headers