Add cache header for static files
This commit is contained in:
parent
61b971872a
commit
b415c90322
1 changed files with 4 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue