fix nginx cache
This commit is contained in:
parent
a50427948a
commit
01a3efd402
10
nginx.conf
10
nginx.conf
@ -34,10 +34,16 @@ http {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||
# 静态资源
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location /assets {
|
||||
# 静态资源
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
root /public;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user