1
Fork 0

Add cache header for static files

This commit is contained in:
Jake Howard 2020-05-10 16:46:37 +01:00
parent 61b971872a
commit b415c90322
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -41,7 +41,8 @@ http {
add_header Referrer-Policy "same-origin";
add_header Strict-Transport-Security "max-age=5184000";
location ~* ^/(_matrix|stats|js|scss|img|css|fonts|webfonts|\.well-known/matrix)+? {
location ~* ^/(_matrix|stats|\.well-known/matrix)+? {
access_log off;
}
@ -50,8 +51,9 @@ http {
return 200 "PONG";
}
location ~* \.(png|jpg|gif|svg|txt|xml)$ {
location ~* \.(png|jpg|gif|svg|txt|css|js|xml|eot|ttf|woff2|woff)$ {
access_log off;
add_header Cache-Control "public, max-age=0, must-revalidate";
}
location = /favicon.ico {