Update nginx.conf

This commit is contained in:
pavelzilke@micord.ru 2024-12-20 13:10:54 +03:00
parent dfc629adc2
commit 7ce59aeb91

View file

@ -74,10 +74,24 @@ http {
text/plain
text/xml;
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {
expires 1M;
access_log off;
# max-age must be in seconds
add_header Cache-Control "max-age=2629746, public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "max-age=31556952, public";
}
location / {
root /frontend;
index index.html;
expires -1;
try_files $uri $uri/ $uri/index.html;
}
@ -87,4 +101,4 @@ http {
return 200 '{"status":"UP"}';
}
}
}
}