Optimize caching for static files
This commit is contained in:
parent
d8429c43a6
commit
ca7e679ebb
@ -24,19 +24,17 @@ http {
|
|||||||
internal;
|
internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(jpg|jpeg|png|gif|ico|css|html)$ {
|
location ~* \.(jpg|jpeg|png|gif|ico|css|html)$ {
|
||||||
expires 30d;
|
expires 30d;
|
||||||
add_header Pragma public;
|
add_header Pragma public;
|
||||||
add_header Cache-Control "public";
|
add_header Cache-Control "public";
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.js$ {
|
location ~* \.js$ {
|
||||||
expires 30d;
|
expires 30d;
|
||||||
add_header Pragma public;
|
add_header Pragma public;
|
||||||
add_header Cache-Control "public";
|
add_header Cache-Control "public";
|
||||||
add_header Content-Type application/javascript;
|
add_header Content-Type application/javascript;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user