diff --git a/config/config.default.js b/config/config.default.js index b5ab704cef..5c0259ea06 100644 --- a/config/config.default.js +++ b/config/config.default.js @@ -359,7 +359,7 @@ module.exports = appInfo => { config.workerStartTimeout = 10 * 60 * 1000; /** - * server timeout in milliseconds, default to 2 minutes. + * server timeout in milliseconds, default to 0 (no timeout). * * for special request, just use `ctx.req.setTimeout(ms)` * diff --git a/index.d.ts b/index.d.ts index c413d8ae1a..1dbf24df55 100644 --- a/index.d.ts +++ b/index.d.ts @@ -330,7 +330,7 @@ declare module 'egg' { * @property {Number} queryString.parameterLimit - parameter number limit, default 1000 * @property {String[]} enableTypes - parser will only parse when request type hits enableTypes, default is ['json', 'form'] * @property {Object} extendTypes - support extend types - * @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 `403` response when `Prototype-Poisoning` happen. + * @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. */ bodyParser: { enable: boolean; @@ -352,7 +352,7 @@ declare module 'egg' { form: string[]; text: string[]; }; - /** Default is `'error'`, it will return `403` response when `Prototype-Poisoning` happen. */ + /** Default is `'error'`, it will return `400` response when `Prototype-Poisoning` happen. */ onProtoPoisoning: 'error' | 'remove' | 'ignore'; }; @@ -532,7 +532,7 @@ declare module 'egg' { onClientError(err: Error, socket: Socket, app: EggApplication): ClientErrorResponse | Promise; /** - * server timeout in milliseconds, default to 2 minutes. + * server timeout in milliseconds, default to 0 (no timeout). * * for special request, just use `ctx.req.setTimeout(ms)` *