Statische Dateien eine Woche cachen und Team-Logos lazy laden
This commit is contained in:
parent
9bc5e5b905
commit
d196b8b929
8 changed files with 34 additions and 12 deletions
|
|
@ -156,6 +156,20 @@ def build_htaccess(creds, app_url):
|
|||
"RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]",
|
||||
"</IfModule>",
|
||||
"",
|
||||
"<IfModule mod_headers.c>",
|
||||
" # Statische Dateien eine Woche cachen. Ohne diese Zeilen fragt der",
|
||||
" # Browser bei jedem Seitenaufruf erneut nach (304) - Bilder sind",
|
||||
" # der groesste Traffic-Posten (siehe docs/betriebsdiagnose.md).",
|
||||
" <FilesMatch \"\\.(png|jpe?g|gif|svg|webp|ico|css|woff2?)$\">",
|
||||
" Header set Cache-Control \"public, max-age=604800\"",
|
||||
" </FilesMatch>",
|
||||
" # Der Service Worker steuert die App-Updates und darf nicht lange",
|
||||
" # im Cache haengen, sonst bleiben Aenderungen tagelang unsichtbar.",
|
||||
" <Files \"sw.js\">",
|
||||
" Header set Cache-Control \"no-cache\"",
|
||||
" </Files>",
|
||||
"</IfModule>",
|
||||
"",
|
||||
]
|
||||
for name in HTACCESS_ORDER:
|
||||
if values.get(name):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue