mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-12 13:52:15 +00:00
fix(sms): set client_max_size on the Twilio webhook Application
Follow-up to the salvaged #54620: the post-read length check bounds processing but a chunked body is still buffered by aiohttp first. client_max_size enforces the same 64 KiB cap mid-read on every path (#58536/#58902/#59180 pattern).
This commit is contained in:
parent
940b69b1a8
commit
3dd5ce236a
1 changed files with 4 additions and 1 deletions
|
|
@ -119,7 +119,10 @@ class SmsAdapter(BasePlatformAdapter):
|
|||
self._webhook_port,
|
||||
)
|
||||
|
||||
app = web.Application()
|
||||
# client_max_size bounds every read path — including chunked bodies
|
||||
# with no Content-Length — before the handler's own 413 checks run
|
||||
# (#58536/#58902/#59180 pattern).
|
||||
app = web.Application(client_max_size=_TWILIO_WEBHOOK_MAX_BODY_BYTES)
|
||||
app.router.add_post("/webhooks/twilio", self._handle_webhook)
|
||||
app.router.add_get("/health", lambda _: web.Response(text="ok"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue