Add cache header for main website static resources

This commit is contained in:
Marko Korhonen 2022-03-24 22:14:12 +02:00
parent 59399c376e
commit 9bc5c5c70f

View file

@ -6,6 +6,12 @@ server {
location / { location / {
root /korhonen.cc; root /korhonen.cc;
index index.html; index index.html;
location ~* \.(?:css|js|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
} }
# Use hugo 404 page # Use hugo 404 page