Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs: state the per-client half of the in-flight body budget
Yudhi Armyndharis305129b1aa50
diff --git a/.env.example b/.env.exampleindex d07a43d0d..ea706be29 100644--- a/.env.example+++ b/.env.example@@ -744,6 +744,9 @@ PLUGINS_DIR=./data/plugins # Plugin directory (default: ./data/plugins)# Aggregate cap on request-body bytes buffered across ALL connections. Once exceeded, new requests# get 503 + Retry-After without their body being read (protects against slow-body memory pinning).# Keep it >= BODY_SIZE_LIMIT. Default: 4 x BODY_SIZE_LIMIT (100 MiB with the default 25mb cap).+# One client IP may hold at most HALF of this budget in flight and gets the same 503 + Retry-After+# past that, so a single heavy uploader cannot pin the whole gateway. Behind a reverse proxy set+# TRUSTED_PROXIES, or every caller resolves to the proxy address and shares that one half.# INFLIGHT_BODY_BUDGET_BYTES=104857600# # Each client IP gets half the budget as its own share (no one# # uploader/attacker can pin more), keyed via TRUSTED_PROXIES.diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8b3e5f2a4..392d96de7 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Documentation- The API reference and capability matrix record where the two engines differ on calls both support: read receipts, edit, pin and unpin, the profile writes, mute, and the channel lookup.+- The per-client half of the in-flight body budget is documented: one IP is refused with `503` past it even while the gateway has room, and without `TRUSTED_PROXIES` every caller shares that half.## [0.21.0] - 2026-08-18diff --git a/docs/12-troubleshooting-faq.md b/docs/12-troubleshooting-faq.mdindex 634fd87f3..149a52f53 100644--- a/docs/12-troubleshooting-faq.md+++ b/docs/12-troubleshooting-faq.md@@ -688,6 +688,11 @@ BODY_SIZE_LIMIT=25mb# is refused with 415 — the aggregate in-flight cap counts bytes on the wire, so a compressed# body would be admitted small and then inflated past the memory that cap exists to bound.+# Note: one client IP may hold at most half the aggregate in-flight budget, and is refused with+# 503 + Retry-After past that even while the gateway as a whole has room. Behind a reverse proxy,+# set TRUSTED_PROXIES: without it every caller resolves to the proxy's own address and shares a+# single half, which looks like a 503 at half the budget you configured.+# Supported formats# Images: jpg, jpeg, png, gif, webp# Videos: mp4, 3gp