Harden Cards administrator access and the database path

Ignore the development login in production unless a test server asks for it in
code, apply the administrator list to existing accounts at startup, and move
the example database to a folder the deployment script does not reset to root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-05 17:55:52 +01:00
parent 115e62d5b2
commit b2e46b1d2a
5 changed files with 64 additions and 5 deletions

View file

@ -34,7 +34,7 @@ const { startServer } = await import("../server.mjs");
const draws = [0.999, 0, 0.999, 0.999, 0.999, 0];
let drawIndex = 0;
// Tous les parcours et leurs deux comptes partagent la même adresse IP : la limite par minute les ferait échouer au hasard.
const server = startServer({ cardsApiOptions: { apiRateLimit: 100_000, random: (max) => Math.min(max - 1, Math.floor(draws[drawIndex++ % draws.length] * max)) } });
const server = startServer({ cardsApiOptions: { allowProductionDevAuth: true, apiRateLimit: 100_000, random: (max) => Math.min(max - 1, Math.floor(draws[drawIndex++ % draws.length] * max)) } });
let stopping = false;
function stop() {