Files
schattenpost/deploy/nginx.conf
Claude Code efbc185ba0 nginx: Manifest mit korrektem MIME-Type application/manifest+json
nginx-alpine mappt .webmanifest sonst auf octet-stream -> Chrome mag den
PWA-Manifest-Type nicht sauber.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 11:10:22 +00:00

26 lines
881 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# App-Shell darf NUR von der eigenen Homepage als iframe eingebettet werden.
add_header Content-Security-Policy "frame-ancestors 'self' https://gaertner.onl https://*.gaertner.onl" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer" always;
# Service Worker & Manifest nie cachen -> App-Updates greifen sofort.
location = /sw.js { add_header Cache-Control "no-cache"; }
location = /manifest.webmanifest {
default_type application/manifest+json; # nginx-alpine kennt .webmanifest nicht
add_header Cache-Control "no-cache";
}
# Entwickler-/Test-Artefakte (_-Präfix) niemals ausliefern.
location ~ /_ { deny all; }
location / {
try_files $uri $uri/ =404;
}
}