- Rooms hold seats plus engine GameState and pin their campaign by hash
under DATA_DIR/campaigns/pinned; CampaignLibrary offers the built-ins
- Protocol v2: campaign-defined roles and actions, personal snapshots with
filtered logs, hidden goals, action menus with relay-computed check
previews, exits, items and stats; structured rolls in the log
- GET /campaigns and GET /rooms/{code}/lobby; /health reports api 2; room
requests without X-DePraxis-Api: 2 get a 426 "update the app" message
- Narrator takes the campaign brief and only the public log
- Actions can be limited to roles; Hollow Point's Burn uses it
- App: campaign picker, per-campaign roles, lobby lookup before joining,
server-driven action menu with move/exit chooser, items, stats, statuses,
campaign clock and endings with debriefs; rolls from structured data
- Original Dead Channel rules kept in tests as the parity reference
- Smoke scripts, Caddyfile and architecture docs updated
46 lines
984 B
Caddyfile
46 lines
984 B
Caddyfile
{
|
|
servers {
|
|
max_header_size 16KB
|
|
timeouts {
|
|
read_header 5s
|
|
read_body 10s
|
|
write 45s
|
|
idle 30s
|
|
}
|
|
}
|
|
}
|
|
|
|
# Replace with your actual domain. Caddy manages HTTPS certificates and renewal.
|
|
relay.example.com {
|
|
request_body {
|
|
max_size 16KB
|
|
}
|
|
header {
|
|
Strict-Transport-Security "max-age=31536000"
|
|
X-Content-Type-Options nosniff
|
|
Referrer-Policy no-referrer
|
|
-Server
|
|
}
|
|
|
|
# Allowlist game routes. Never proxy the administration surface publicly.
|
|
@game path /health /campaigns /rooms /rooms/*
|
|
handle @game {
|
|
reverse_proxy 127.0.0.1:1337 {
|
|
# Tiny bounded JSON requests are fully received before occupying a Java worker.
|
|
request_buffers 16KB
|
|
unhealthy_request_count 32
|
|
# Replace untrusted client-supplied forwarding headers.
|
|
header_up X-Real-IP {remote_host}
|
|
header_up X-Forwarded-Proto {scheme}
|
|
transport http {
|
|
dial_timeout 3s
|
|
response_header_timeout 40s
|
|
max_conns_per_host 64
|
|
}
|
|
}
|
|
}
|
|
handle {
|
|
respond "Not found" 404
|
|
}
|
|
}
|