You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _includes/readmes/body-parser.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,8 @@ specifies the number of bytes; if it is a string, the value is passed to the
100
100
[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
101
101
to `'100kb'`.
102
102
103
+
> It’s recommended not to configure a very high limit and to use the default value whenever possible. Allowing larger payloads increases memory usage because of the resources required for decoding and transformations, and it can also lead to longer response times as more data is processed. By ‘very high’, we mean values above the default, for example payloads of 5 MB or more can already start to introduce these risks. With the default limits, these issues do not occur.
104
+
103
105
##### reviver
104
106
105
107
The `reviver` option is passed directly to `JSON.parse` as the second
@@ -156,6 +158,8 @@ specifies the number of bytes; if it is a string, the value is passed to the
156
158
[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
157
159
to `'100kb'`.
158
160
161
+
> It’s recommended not to configure a very high limit and to use the default value whenever possible. Allowing larger payloads increases memory usage because of the resources required for decoding and transformations, and it can also lead to longer response times as more data is processed. By ‘very high’, we mean values above the default, for example payloads of 5 MB or more can already start to introduce these risks. With the default limits, these issues do not occur.
162
+
159
163
##### type
160
164
161
165
The `type` option is used to determine what media type the middleware will
@@ -207,6 +211,8 @@ specifies the number of bytes; if it is a string, the value is passed to the
207
211
[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
208
212
to `'100kb'`.
209
213
214
+
> It’s recommended not to configure a very high limit and to use the default value whenever possible. Allowing larger payloads increases memory usage because of the resources required for decoding and transformations, and it can also lead to longer response times as more data is processed. By ‘very high’, we mean values above the default, for example payloads of 5 MB or more can already start to introduce these risks. With the default limits, these issues do not occur.
215
+
210
216
##### type
211
217
212
218
The `type` option is used to determine what media type the middleware will
@@ -262,6 +268,8 @@ specifies the number of bytes; if it is a string, the value is passed to the
262
268
[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
263
269
to `'100kb'`.
264
270
271
+
> It’s recommended not to configure a very high limit and to use the default value whenever possible. Allowing larger payloads increases memory usage because of the resources required for decoding and transformations, and it can also lead to longer response times as more data is processed. By ‘very high’, we mean values above the default, for example payloads of 5 MB or more can already start to introduce these risks. With the default limits, these issues do not occur.
272
+
265
273
##### parameterLimit
266
274
267
275
The `parameterLimit` option controls the maximum number of parameters that
0 commit comments