Files
dungeoncraft/nginx.conf
T
Richard ZinkandClaude Opus 5.5 44b938f0e5 Installable as an app (PWA): manifest, pixel-art icons, offline service worker
- manifest.webmanifest (full screen, any orientation), icons 192/512/maskable/apple-touch
- sw.js: network first, cache as offline fallback, the savegame API is never cached
- registered only over HTTPS or on localhost; nginx serves the manifest type
- README: installing, HTTPS requirement

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:41:29 +01:00

25 lines
718 B
Nginx Configuration File

server {
listen 80;
root /usr/share/nginx/html;
index index.html;
# test build: always reload fresh files
add_header Cache-Control "no-cache";
location / {
try_files $uri $uri/ =404;
}
# installable app (PWA)
location ~ \.webmanifest$ {
default_type application/manifest+json;
try_files $uri =404;
}
# savegame service (server/). Resolved at request time, so the game still starts without it;
# the game then falls back to savegame files.
location /api/ {
resolver 127.0.0.11 valid=10s ipv6=off;
set $saves http://saves:8080;
proxy_pass $saves;
client_max_body_size 2m;
proxy_read_timeout 15s;
}
}