@@ -278,9 +278,14 @@ user response. There is currently no way to short-circuit this behavior.
278
278
279
279
#### limit
280
280
281
- This sets the body size limit (default: ` 1mb ` ). If the body size is larger than the specified (or default) limit,
282
- a ` 413 Request Entity Too Large ` error will be returned. See [ bytes.js] ( https://www.npmjs.com/package/bytes ) for
283
- a list of supported formats.
281
+ When ` parseReqBody ` is true, this is passed to ` getRawBody ` [ https://www.npmjs.com/package/raw-body ] , and accepts the same arguments.
282
+
283
+ This limits the request body size when ` parseReqBody ` is true. (default: ` 1mb ` ).
284
+
285
+ If the body size is larger than the specified (or default) limit, a `413
286
+ Request Entity Too Large` error will be returned. See
287
+ [ bytes.js] ( https://www.npmjs.com/package/bytes ) for a list of supported
288
+ formats.
284
289
285
290
``` js
286
291
app .use (' /proxy' , proxy (' www.google.com' , {
@@ -471,18 +476,19 @@ app.use('/proxy', proxy('www.google.com', {
471
476
```
472
477
473
478
#### parseReqBody
479
+ [ default: true]
480
+
481
+ The ` parseReqBody ` option allows you to suppress parsing of the request
482
+ body. (The request body is parsed to make it available for modification and
483
+ decoration before being added to the proxy request.)
474
484
475
- The ``` parseReqBody ``` option allows you to control parsing the request body.
476
485
For example, disabling body parsing is useful for large uploads where it would be inefficient
477
486
to hold the data in memory.
478
487
479
- ##### Note: this setting is required for binary uploads. A future version of this library may handle this for you.
480
-
481
- This defaults to true in order to preserve legacy behavior.
482
-
483
- When false, no action will be taken on the body and accordingly ``` req.body ``` will no longer be set.
488
+ When false, no action will be taken on the body and accordingly ` req.body ` will no longer be set.
484
489
485
- Note that setting this to false overrides ``` reqAsBuffer ``` and ``` reqBodyEncoding ``` below.
490
+ #### Note: set this to false for binary uploads.
491
+ #### Note that setting this to false obviates ` reqAsBuffer ` and ` reqBodyEncoding ` settings.
486
492
487
493
``` js
488
494
app .use (' /proxy' , proxy (' www.google.com' , {
0 commit comments