fix: increase Socket.IO maxHttpBufferSize to 300MB to support larger drafting payloads and prevent 413 errors.
This commit is contained in:
@@ -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).
|
||||
Reference in New Issue
Block a user