Skip to content

Commit

Permalink
chore: serverTimeout default to 0 (no timeout)
Browse files Browse the repository at this point in the history
typo fix on onProtoPoisoning, should be 400 response
  • Loading branch information
fengmk2 committed Jun 7, 2024
1 parent 3ddbd06 commit 83f3667
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
*
Expand Down
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';
};

Expand Down Expand Up @@ -532,7 +532,7 @@ declare module 'egg' {
onClientError(err: Error, socket: Socket, app: EggApplication): ClientErrorResponse | Promise<ClientErrorResponse>;

/**
* 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)`
*
Expand Down

0 comments on commit 83f3667

Please sign in to comment.