Files
mtg-online-drafter/docs/development/devlog/2025-12-18-112633_resolve_413_errors.md
2025-12-18 11:47:10 +01:00

902 B

Resolve 413 Request Entity Too Large Errors

Objective

Fix the "413 Request Entity Too Large" errors occurring during large uploads or requests after application deployment.

Changes

  1. Helm Chart Configuration (helm/mtg-draft-maker/values.yaml):

    • Added Nginx Ingress annotation nginx.ingress.kubernetes.io/proxy-body-size: "0" to disable the body size limit check at the ingress level.
  2. Server Configuration (src/server/index.ts):

    • Increased maxHttpBufferSize for Socket.IO to 1GB.
    • Increased express.json body parser limit to 1000MB to support large JSON payloads (e.g., extensive card lists).

Verification

  • Infrastructure: Ensure the application is redeployed with the updated Helm chart for the ingress annotation to take effect.
  • Application: Verify that large payloads can be sent to the server without triggering 413 errors.