Files
dungeoncraft/nginx.conf
T
Richard ZinkandClaude Opus 5.5 c9848c8948 User accounts, login before the title screen, own savegames per user, standalone download
- Service: accounts with Argon2 password hashes and session tokens; the first login creates
  the admin (shared savegames of before move to the admin); the admin creates and deletes
  users; everybody can change the password; savegames are stored and listed per user
- Game: login page before the title (only when the service is reachable), with licence and
  repository link; account page (password, logout; users for the admin); text fields with
  Tab/Enter, masked passwords, browser dialog on touch screens; long status messages wrap
- Download Standalone: DungeonCraft.html with the game embedded (built in the Docker image,
  served to logged-in users via nginx auth_request); works from file:// without server and
  opens downloaded savegames
- Without the service (standalone, local files) there is no login, savegame files as before

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

30 lines
889 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;
}
# the standalone file only for logged-in users (checked by the service)
location /standalone/ {
auth_request /api/auth;
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;
}
}