@reldens/server-utils 0.22.0 → 0.23.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.
|
@@ -35,13 +35,13 @@ class RateLimitConfigurer
|
|
|
35
35
|
}
|
|
36
36
|
let limiterParams = {
|
|
37
37
|
windowMs: this.windowMs,
|
|
38
|
-
|
|
38
|
+
limit: this.maxRequests,
|
|
39
39
|
standardHeaders: true,
|
|
40
40
|
legacyHeaders: false,
|
|
41
41
|
message: this.tooManyRequestsMessage
|
|
42
42
|
};
|
|
43
43
|
if(this.isDevelopmentMode){
|
|
44
|
-
limiterParams.
|
|
44
|
+
limiterParams.limit = this.maxRequests * this.developmentMultiplier;
|
|
45
45
|
}
|
|
46
46
|
if(this.applyKeyGenerator){
|
|
47
47
|
limiterParams.keyGenerator = function(req){
|
|
@@ -55,12 +55,12 @@ class RateLimitConfigurer
|
|
|
55
55
|
{
|
|
56
56
|
let limiterParams = {
|
|
57
57
|
windowMs: this.windowMs,
|
|
58
|
-
|
|
58
|
+
limit: this.maxRequests,
|
|
59
59
|
standardHeaders: true,
|
|
60
60
|
legacyHeaders: false
|
|
61
61
|
};
|
|
62
62
|
if(this.isDevelopmentMode){
|
|
63
|
-
limiterParams.
|
|
63
|
+
limiterParams.limit = this.maxRequests * this.developmentMultiplier;
|
|
64
64
|
}
|
|
65
65
|
if(this.applyKeyGenerator){
|
|
66
66
|
limiterParams.keyGenerator = function(req){
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reldens/server-utils",
|
|
3
3
|
"scope": "@reldens",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.23.0",
|
|
5
5
|
"description": "Reldens - Server Utils",
|
|
6
6
|
"author": "Damian A. Pastorini",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"url": "https://github.com/damian-pastorini/reldens-server-utils/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"body-parser": "2.2.0",
|
|
39
|
-
"compression": "1.8.
|
|
40
|
-
"cors": "2.8.5",
|
|
41
|
-
"express": "4.21.2",
|
|
42
|
-
"express-rate-limit": "
|
|
43
|
-
"express-session": "1.18.
|
|
44
|
-
"helmet": "8.1.0",
|
|
45
|
-
"multer": "2.0.
|
|
46
|
-
"sanitize-html": "2.17.0"
|
|
38
|
+
"body-parser": "^2.2.0",
|
|
39
|
+
"compression": "^1.8.1",
|
|
40
|
+
"cors": "^2.8.5",
|
|
41
|
+
"express": "^4.21.2",
|
|
42
|
+
"express-rate-limit": "^8.0.1",
|
|
43
|
+
"express-session": "^1.18.2",
|
|
44
|
+
"helmet": "^8.1.0",
|
|
45
|
+
"multer": "^2.0.2",
|
|
46
|
+
"sanitize-html": "^2.17.0"
|
|
47
47
|
}
|
|
48
48
|
}
|