import type { Plugin } from './app'; /** * Plugin: reject a request whose `Content-Length` exceeds `maxBytes` with * `413 Payload Too Large`, before the body is read. A cheap first-line guard * against oversized uploads. (Chunked requests that omit `Content-Length` pass * this check; enforce those in a streaming parser.) * * ```ts * const app = await createApp({ plugins: [bodyLimit(1_000_000)] }) // 1 MB * ``` * * @param maxBytes - size ceiling in bytes; a request is rejected only when its * `Content-Length` is strictly greater, so a body of exactly `maxBytes` passes * @returns a plugin whose request hook rejects oversized requests with `413` */ export declare function bodyLimit(maxBytes: number): Plugin; //# sourceMappingURL=body-limit.d.ts.map