reduce caching

This commit is contained in:
Andreas Knuth 2026-02-02 17:52:41 -06:00
parent 69af529410
commit be0642c389
1 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,14 @@ www.bizmatch.net {
root * /home/aknuth/git/bizmatch-project/bizmatch-server # Prod-Ordner root * /home/aknuth/git/bizmatch-project/bizmatch-server # Prod-Ordner
file_server file_server
} }
# Statische Dateien (CSS, JS, Bilder) lange cachen, da sich der Name bei Änderungen ändert
header /assets/* Cache-Control "public, max-age=31536000, immutable"
header /*.css Cache-Control "public, max-age=31536000, immutable"
header /*.js Cache-Control "public, max-age=31536000, immutable"
# Die index.html und API-Antworten NIEMALS cachen
header /index.html Cache-Control "no-cache, no-store, must-revalidate"
#handle { #handle {
# root * /home/aknuth/git/bizmatch-project-prod/bizmatch/dist/bizmatch/browser # Neuer Prod-Dist-Ordner # root * /home/aknuth/git/bizmatch-project-prod/bizmatch/dist/bizmatch/browser # Neuer Prod-Dist-Ordner
# try_files {path} {path}/ /index.html # try_files {path} {path}/ /index.html