egg 3.22.0 → 3.24.0
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/index.d.ts +7 -4
- package/lib/core/dnscache_httpclient.js +3 -3
- package/package.json +4 -4
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 `403` 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 `403` response when `Prototype-Poisoning` happen. */
|
|
356
|
+
onProtoPoisoning: 'error' | 'remove' | 'ignore';
|
|
354
357
|
};
|
|
355
358
|
|
|
356
359
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const dns = require('dns').promises;
|
|
1
|
+
const dns = require('node:dns').promises;
|
|
2
2
|
const LRU = require('ylru');
|
|
3
|
+
const { assign } = require('utility');
|
|
3
4
|
const HttpClient = require('./httpclient');
|
|
4
|
-
const utility = require('utility');
|
|
5
5
|
const utils = require('./utils');
|
|
6
6
|
|
|
7
7
|
const IP_REGEX = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
|
|
@@ -84,7 +84,7 @@ module.exports = DNSCacheHttpClient;
|
|
|
84
84
|
|
|
85
85
|
function formatDnsLookupUrl(host, url, address) {
|
|
86
86
|
if (typeof url === 'string') return url.replace(host, address);
|
|
87
|
-
const urlObj =
|
|
87
|
+
const urlObj = assign({}, url);
|
|
88
88
|
urlObj.hostname = urlObj.hostname.replace(host, address);
|
|
89
89
|
if (urlObj.host) {
|
|
90
90
|
urlObj.host = urlObj.host.replace(host, address);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "egg",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.24.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"tag": "latest"
|
|
6
6
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"egg-cluster": "^2.0.0",
|
|
29
29
|
"egg-cookies": "^2.6.1",
|
|
30
30
|
"egg-core": "^5.4.0",
|
|
31
|
-
"egg-development": "^
|
|
31
|
+
"egg-development": "^3.0.0",
|
|
32
32
|
"egg-errors": "^2.3.1",
|
|
33
33
|
"egg-i18n": "^2.1.1",
|
|
34
34
|
"egg-jsonp": "^2.0.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"extend2": "^1.0.1",
|
|
46
46
|
"graceful": "^1.1.0",
|
|
47
47
|
"humanize-ms": "^1.2.1",
|
|
48
|
-
"is-type-of": "^
|
|
48
|
+
"is-type-of": "^2.1.0",
|
|
49
49
|
"koa-bodyparser": "^4.4.1",
|
|
50
50
|
"koa-is-json": "^1.0.0",
|
|
51
51
|
"koa-override": "^3.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"sendmessage": "^2.0.0",
|
|
56
56
|
"urllib": "^2.33.0",
|
|
57
57
|
"urllib-next": "npm:urllib@^3.22.4",
|
|
58
|
-
"utility": "^1.
|
|
58
|
+
"utility": "^2.1.0",
|
|
59
59
|
"ylru": "^1.3.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|