Optimize caching for static files

This commit is contained in:
Max Schmidt 2023-10-24 10:05:51 +02:00
parent d8429c43a6
commit ca7e679ebb

View File

@ -29,14 +29,12 @@ http {
add_header Pragma public; add_header Pragma public;
add_header Cache-Control "public"; add_header Cache-Control "public";
} }
location ~* \.js$ { location ~* \.js$ {
expires 30d; expires 30d;
add_header Pragma public; add_header Pragma public;
add_header Cache-Control "public"; add_header Cache-Control "public";
add_header Content-Type application/javascript; add_header Content-Type application/javascript;
} }
error_page 404 /404.html; error_page 404 /404.html;
} }
} }