fix: increase Socket.IO maxHttpBufferSize to 300MB to support larger drafting payloads and prevent 413 errors.

This commit is contained in:
2025-12-17 15:33:02 +01:00
parent 4ff2eb0ef0
commit e5750d9729
3 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
# Fix Socket.IO Payload Limit
## Issue
The user reported a `413 (Payload Too Large)` error when creating a draft room with a full box of 36 packs. This was caused by the default `maxHttpBufferSize` limit (1MB) in Socket.IO, which is insufficient for the large JSON payload generated by 540 cards (36 packs * 15 cards) with full metadata.
## Resolution
- Modified `src/server/index.ts` to increase `maxHttpBufferSize` to 300MB (3e8 bytes).
- This explicitly sets the limit in the `Server` initialization options.
## Verification
- `tsx watch` should automatically restart the server.
- The new limit allows for massive payloads, covering the requirement for 36+ packs (requested >250MB).