add more file extensions to cache in nginx.conf
This commit is contained in:
parent
eeb3a141dc
commit
1c63985e2e
|
@ -33,15 +33,15 @@ http {
|
|||
index index.html index.htm;
|
||||
error_page 404 /404/index.html;
|
||||
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
||||
# Fonts and media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|ttf)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# Javascript and CSS files
|
||||
location ~* \.(?:css|js|woff2)$ {
|
||||
location ~* \.(?:css|json|webmanifest|js|woff2|manifest)$ {
|
||||
try_files $uri =404;
|
||||
expires 1y;
|
||||
access_log off;
|
||||
|
|
Reference in New Issue
Block a user