Lift the Sokko TCG request limits on the dev server

Every page reads the Sokko TCG configuration and reserve, and a fast browser
test run loads more than 120 pages a minute from a single address, so the dev
server answered 429. The dev server is local and already gives admin rights to
any visitor, so it now lifts the per-minute limits like the Cards test server.
The production server keeps them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-08 09:15:56 +01:00
parent c9fe3cd83f
commit 51d173710d

View file

@ -15,7 +15,8 @@ function nebulaCardsApi() {
name: "nebula-cards-api",
apply: "serve",
configureServer(server) {
const handler = createCardsApiHandler({ projectRoot: resolve("."), enabled: process.env.CARDS_ENABLED !== "false", devAuth: process.env.CARDS_DEV_AUTH !== "false", devPerks: true });
// Chaque page lit la configuration et la réserve : la suite E2E, depuis une seule adresse, dépasserait la limite par minute de production.
const handler = createCardsApiHandler({ projectRoot: resolve("."), enabled: process.env.CARDS_ENABLED !== "false", devAuth: process.env.CARDS_DEV_AUTH !== "false", devPerks: true, apiRateLimit: 100_000 });
server.middlewares.use(async (req, res, next) => {
if (!await handler(req, res)) next();
});