roles/nginx: Add expires to static files

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2014-10-10 11:05:42 +03:00
parent 81a98596e3
commit 42b893b2a7
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -5,6 +5,11 @@
try_files $uri $uri/ /index.php?$args; try_files $uri $uri/ /index.php?$args;
} }
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 7d;
add_header Cache-Control "must-revalidate";
}
# Add trailing slash to */wp-admin requests. # Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent; rewrite /wp-admin$ $scheme://$host$uri/ permanent;