Fix security vulnerabilities
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
export declare class RequestBodyTooLargeError extends Error {
|
||||
status: number;
|
||||
constructor(max_bytes: number);
|
||||
}
|
||||
type Params = {
|
||||
req: Request;
|
||||
max_bytes: number;
|
||||
};
|
||||
/**
|
||||
* Reads the whole request body, aborting as soon as it grows past
|
||||
* `max_bytes` so oversized (or chunked, length-less) bodies are never fully
|
||||
* buffered. Returns `undefined` when the request has no body.
|
||||
*/
|
||||
export default function readRequestBody({ req, max_bytes, }: Params): Promise<Uint8Array<ArrayBuffer> | undefined>;
|
||||
export {};
|
||||
Reference in New Issue
Block a user