Add cache header for main website static resources
This commit is contained in:
parent
59399c376e
commit
9bc5c5c70f
1 changed files with 10 additions and 4 deletions
|
@ -3,10 +3,16 @@ server {
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
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
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue