nginx: Cache-Header fuer Root-Statik (Logo etc.), assets mit ^~ abgesichert
Build & Deploy / deploy (push) Successful in 24s
Build & Deploy / deploy (push) Successful in 24s
This commit is contained in:
@@ -19,12 +19,20 @@ server {
|
||||
add_header Cache-Control "no-cache" always;
|
||||
}
|
||||
|
||||
# Cache für gehashte Build-Assets
|
||||
location /assets/ {
|
||||
# Cache für gehashte Build-Assets (^~ = Prefix schlägt Regex-Locations,
|
||||
# sonst würde die Bild-Regel unten das immutable-Caching überschreiben)
|
||||
location ^~ /assets/ {
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Statische Dateien im Root (Logo, Favicons – nicht hash-benannt,
|
||||
# daher nur kurz cachen, sonst riskiert der Browser veraltete Dateien)
|
||||
location ~* \.(png|jpg|jpeg|webp|ico|svg|woff2?)$ {
|
||||
expires 1d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# Mail-API des Portals (Container mp-mail-api im selben Docker-Netz npm_default).
|
||||
# Das Token kommt aus portal.env (envsubst beim Container-Start) und liegt
|
||||
# NIE im Repo und NIE im Browser – der Endpunkt ist nur vom Server erreichbar.
|
||||
|
||||
Reference in New Issue
Block a user