mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-11 13:41:53 +00:00
fix(whatsapp): set client_max_size on the webhook Application
Follow-up to the salvaged #54944: before this, aiohttp's implicit 1 MiB default client_max_size tripped BEFORE the intended 3 MB Meta cap could apply on read() paths — the explicit value makes the documented limit real while the bounded reader keeps chunked bodies from buffering past 3 MB (#58536/#58902/#59180 pattern).
This commit is contained in:
parent
eec92a92c0
commit
e82d71db40
1 changed files with 4 additions and 1 deletions
|
|
@ -415,7 +415,10 @@ class WhatsAppCloudAdapter(WhatsAppBehaviorMixin, BasePlatformAdapter):
|
|||
)
|
||||
|
||||
# Inbound webhook server.
|
||||
app = web.Application()
|
||||
# client_max_size backstops the bounded reader in _handle_webhook —
|
||||
# aiohttp enforces the cap on request.read()/post() paths too
|
||||
# (#58536/#58902/#59180 pattern).
|
||||
app = web.Application(client_max_size=WEBHOOK_MAX_BODY_BYTES)
|
||||
app.router.add_get(self._health_path, self._handle_health)
|
||||
app.router.add_get(self._webhook_path, self._handle_verify)
|
||||
app.router.add_post(self._webhook_path, self._handle_webhook)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue