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
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,11 @@
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.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;