import { type Middleware } from "@nifrajs/core/server"; export interface BodyLimitOptions { /** Maximum raw request-body bytes accepted. */ readonly maxBytes: number; /** Methods to inspect. Default: every method except GET/HEAD/OPTIONS/TRACE. */ readonly methods?: readonly string[]; /** Response error name for over-limit bodies. Default `"payload_too_large"`. */ readonly error?: string; /** Allow bodies without Content-Length. Default false (fail closed with 411). */ readonly allowLengthless?: boolean; } /** * Enforce a raw byte cap for request bodies before routing. This middleware is intentionally * Content-Length based: reading a cloned Web body is not transparent on every runtime. Lengthless * bodies fail closed by default; use route-level `c.boundedBody()` / schema validation for endpoints * that intentionally accept streamed bodies. */ export declare function bodyLimit(options: BodyLimitOptions): Middleware; //# sourceMappingURL=body-limit.d.ts.map