v0.3.0-unstable8

This commit is contained in:
Yann Stepienik 2023-05-01 00:46:43 +01:00
parent c9cea9b6b9
commit ceac360533
3 changed files with 3 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.3.0-unstable7",
"version": "0.3.0-unstable8",
"description": "",
"main": "test-server.js",
"bugs": {

View file

@ -222,8 +222,6 @@ func StartServer() {
srapi.Use(proxy.SmartShieldMiddleware(
utils.SmartShieldPolicy{
Enabled: true,
PerUserSimultaneous: 8,
MaxGlobalSimultaneous: 12,
PolicyStrictness: 1,
PerUserRequestLimit: 5000,
},

View file

@ -240,10 +240,10 @@ func SmartShieldMiddleware(policy utils.SmartShieldPolicy) func(http.Handler) ht
policy.PolicyStrictness = 2 // NORMAL
}
if(policy.PerUserSimultaneous == 0) {
policy.PerUserSimultaneous = 8
policy.PerUserSimultaneous = 12
}
if(policy.MaxGlobalSimultaneous == 0) {
policy.MaxGlobalSimultaneous = 50
policy.MaxGlobalSimultaneous = 160
}
if(policy.PrivilegedGroups == 0) {
policy.PrivilegedGroups = utils.ADMIN