Neuaufbau: Astro 5, Anfrage statt Buchung, Kundenkarte, Design-Tokens, SEO/GEO, Security-Header
This commit is contained in:
1 parent
49afd192ef
commit
0aa72718a0
86 files changed
+9743
-1079
No files matched your search
+47
-5
@@ -4,16 +4,58 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
server_tokens off;
|
||||
absolute_redirect off;
|
||||
charset utf-8;
|
||||
charset_types text/plain text/css application/javascript application/json application/xml image/svg+xml;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/css application/javascript image/svg+xml;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
gzip_min_length 256;
|
||||
gzip_types text/plain text/css application/javascript application/json application/ld+json application/xml text/xml image/svg+xml;
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
# Alte und frühere Adressen (Relaunch). Vor Livegang mit der Altseite abgleichen.
|
||||
location = /leistungen { return 301 /leistungen-preise; }
|
||||
location = /kontaktdaten { return 301 /kontakt; }
|
||||
location = /hochzeitsservice { return 301 /brautservice; }
|
||||
location = /braut { return 301 /brautservice; }
|
||||
location = /balayage { return 301 /balayage-farbe; }
|
||||
location = /haarverdichtung { return 301 /haarverlaengerung; }
|
||||
location = /treuekarte { return 301 /kundenkarte; }
|
||||
|
||||
# Abschließenden Schrägstrich entfernen (kanonische URLs ohne /)
|
||||
rewrite ^/(.+)/$ /$1 permanent;
|
||||
|
||||
# Gehashte Build-Dateien: ein Jahr, unveränderlich
|
||||
location ^~ /_astro/ {
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location ^~ /fonts/ {
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location ~* \.(?:png|jpg|jpeg|svg|ico|webp|avif)$ {
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
add_header Cache-Control "public, max-age=604800";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ $uri.html /index.html;
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
add_header Cache-Control "public, max-age=0, must-revalidate";
|
||||
try_files $uri $uri/index.html $uri.html =404;
|
||||
}
|
||||
|
||||
location ~* \.(webp|jpg|jpeg|png|svg|woff2|css|js)$ {
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, max-age=2592000";
|
||||
location = /404.html {
|
||||
internal;
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user