From 271684ce85879579c2c25f4f7c95aa71b29f7a57 Mon Sep 17 00:00:00 2001 From: cursor Date: Sun, 5 Jul 2026 15:14:45 +0000 Subject: [PATCH] fix(scoring): PWA installierbar + Mikrofon auf Android/Chrome MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Web-App-Manifest, Service Worker und Icons für Install-Prompt; Permissions-Policy erlaubt Mikrofon (self); getUserMedia vor Speech API. Co-authored-by: Cursor --- nginx/default.conf | 7 ++- nginx/security-headers.conf | 2 +- public/scoring/icons/icon-192.png | Bin 0 -> 506 bytes public/scoring/icons/icon-512.png | Bin 0 -> 1908 bytes public/scoring/index.html | 89 ++++++++++++++++++++++++---- public/scoring/manifest.webmanifest | 32 ++++++++++ public/scoring/sw.js | 29 +++++++++ 7 files changed, 146 insertions(+), 13 deletions(-) create mode 100644 public/scoring/icons/icon-192.png create mode 100644 public/scoring/icons/icon-512.png create mode 100644 public/scoring/manifest.webmanifest create mode 100644 public/scoring/sw.js diff --git a/nginx/default.conf b/nginx/default.conf index b8f6bf8..1304271 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -12,7 +12,12 @@ server { gzip_vary on; gzip_proxied any; gzip_comp_level 6; - gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml; + gzip_types text/plain text/css text/xml application/json application/javascript application/manifest+json application/xml+rss application/atom+xml image/svg+xml; + + location ~* \.webmanifest$ { + default_type application/manifest+json; + add_header Cache-Control "public, max-age=86400"; + } location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|webp)$ { expires 1y; diff --git a/nginx/security-headers.conf b/nginx/security-headers.conf index 9a74c49..83043de 100644 --- a/nginx/security-headers.conf +++ b/nginx/security-headers.conf @@ -4,5 +4,5 @@ add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" alway add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; -add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always; +add_header Permissions-Policy "geolocation=(), microphone=(self), camera=()" always; add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; base-uri 'self'; form-action 'self'; object-src 'none'" always; diff --git a/public/scoring/icons/icon-192.png b/public/scoring/icons/icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..0a7f1329554544644bea45555dbe22d3817edf56 GIT binary patch literal 506 zcmeAS@N?(olHy`uVBq!ia0vp^2SAvE2}s`E_d9@rf$^ZHi(^Q|t+$spavo3+ad3Rj zv82qp++%*NjHlqGs>e(J1AIyA&G9rth?;LPj)S7EiwHCj8g_rS3j3^P6urM$%GB_|W2$095RQmxI@;wX*C$hr}sy%^~q5uGf8@b_^(EhEgtf+{Cfk^=v z;T#RXh*toH22%qt8K4P*$g=st zD**-;2Vl|@U|?imbYNfsLPh}~4<_iq;6upMU}uo*X|M*2AV%^uFd(r7F`6J*0S+`{ zhZUMf(S0w#pp728XjVhg0f})94JT?uIXOYD07@mGB#S$ZM=$~t05BbZ(gZM7fD#8V zs6eTLoMMI?JxHY>h1w}77of#4xy1^+G$+4Q2L}U8dxJgugE}?_MowVd0V5As$N&o> ea+t*Hk)OFx_|JwvE=~yyK;Y@>=d#Wzp$P!Vd7pIv literal 0 HcmV?d00001 diff --git a/public/scoring/index.html b/public/scoring/index.html index 0975396..6959004 100644 --- a/public/scoring/index.html +++ b/public/scoring/index.html @@ -2,7 +2,16 @@ - + + + + + + + + + + Scoring — zwei Spieler