egg 3.23.0 → 3.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/config.default.js +1 -1
- package/index.d.ts +8 -5
- package/package.json +1 -1
package/config/config.default.js
CHANGED
|
@@ -359,7 +359,7 @@ module.exports = appInfo => {
|
|
|
359
359
|
config.workerStartTimeout = 10 * 60 * 1000;
|
|
360
360
|
|
|
361
361
|
/**
|
|
362
|
-
* server timeout in milliseconds, default to
|
|
362
|
+
* server timeout in milliseconds, default to 0 (no timeout).
|
|
363
363
|
*
|
|
364
364
|
* for special request, just use `ctx.req.setTimeout(ms)`
|
|
365
365
|
*
|
package/index.d.ts
CHANGED
|
@@ -326,10 +326,11 @@ declare module 'egg' {
|
|
|
326
326
|
* @property {String} textLimit - json body size limit, default 1mb
|
|
327
327
|
* @property {Boolean} strict - json body strict mode, if set strict value true, then only receive object and array json body
|
|
328
328
|
* @property {Number} queryString.arrayLimit - from item array length limit, default 100
|
|
329
|
-
* @property {Number} queryString.depth - json value deep
|
|
330
|
-
* @property {Number} queryString.parameterLimit -
|
|
331
|
-
* @property {
|
|
332
|
-
* @property {
|
|
329
|
+
* @property {Number} queryString.depth - json value deep length, default 5
|
|
330
|
+
* @property {Number} queryString.parameterLimit - parameter number limit, default 1000
|
|
331
|
+
* @property {String[]} enableTypes - parser will only parse when request type hits enableTypes, default is ['json', 'form']
|
|
332
|
+
* @property {Object} extendTypes - support extend types
|
|
333
|
+
* @property {String} onProtoPoisoning - Defines what action must take when parsing a JSON object with `__proto__`. Possible values are `'error'`, `'remove'` and `'ignore'`. Default is `'error'`, it will return `400` response when `Prototype-Poisoning` happen.
|
|
333
334
|
*/
|
|
334
335
|
bodyParser: {
|
|
335
336
|
enable: boolean;
|
|
@@ -351,6 +352,8 @@ declare module 'egg' {
|
|
|
351
352
|
form: string[];
|
|
352
353
|
text: string[];
|
|
353
354
|
};
|
|
355
|
+
/** Default is `'error'`, it will return `400` response when `Prototype-Poisoning` happen. */
|
|
356
|
+
onProtoPoisoning: 'error' | 'remove' | 'ignore';
|
|
354
357
|
};
|
|
355
358
|
|
|
356
359
|
/**
|
|
@@ -529,7 +532,7 @@ declare module 'egg' {
|
|
|
529
532
|
onClientError(err: Error, socket: Socket, app: EggApplication): ClientErrorResponse | Promise<ClientErrorResponse>;
|
|
530
533
|
|
|
531
534
|
/**
|
|
532
|
-
* server timeout in milliseconds, default to
|
|
535
|
+
* server timeout in milliseconds, default to 0 (no timeout).
|
|
533
536
|
*
|
|
534
537
|
* for special request, just use `ctx.req.setTimeout(ms)`
|
|
535
538
|
*
|