livery_body_limit (livery v0.2.0)
View SourceBody-size cap middleware.
State: #{max => MaxBytes}. When the request body is already
buffered and exceeds the cap, the middleware short-circuits with
413 Payload Too Large and skips the handler. Streaming bodies
pass through unchecked here; size enforcement on a streaming
reader lands once the H1 adapter exposes incremental byte counts.
Summary
Functions
Reject buffered bodies whose iolist_size/1 exceeds max.
Functions
-spec call(livery_req:req(), livery_middleware:next(), #{max := non_neg_integer()}) -> livery_resp:resp().
Reject buffered bodies whose iolist_size/1 exceeds max.