All checks were successful
Release Docker Image / Build & Push Docker Image (release) Successful in 20m23s
55 lines
1.8 KiB
Nginx Configuration File
55 lines
1.8 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Korrekte MIME-Types für WebAssembly
|
|
# Browser lehnen WASM ohne application/wasm ab
|
|
types {
|
|
text/html html htm;
|
|
application/javascript js;
|
|
application/wasm wasm;
|
|
image/svg+xml svg svgz;
|
|
text/css css;
|
|
application/json json;
|
|
font/woff woff;
|
|
font/woff2 woff2;
|
|
}
|
|
|
|
# Komprimierung für JS und WASM (spart ~60-70% Bandbreite)
|
|
gzip on;
|
|
gzip_types application/javascript application/wasm;
|
|
gzip_min_length 1024;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
|
|
# Sicherheits-Header
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
|
|
# Cross-Origin-Header werden für SharedArrayBuffer benötigt
|
|
# (Qt WASM singlethread braucht diese NICHT, aber schadet nicht)
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
}
|
|
|
|
# Caching: WASM/JS lange cachen (Content-Hash im Namen)
|
|
location ~* \.(wasm|js)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
}
|
|
|
|
error_page 404 /index.html;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log warn;
|
|
}
|