v0.3.0-unstable8
This commit is contained in:
parent
c9cea9b6b9
commit
ceac360533
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cosmos-server",
|
"name": "cosmos-server",
|
||||||
"version": "0.3.0-unstable7",
|
"version": "0.3.0-unstable8",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "test-server.js",
|
"main": "test-server.js",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
|
@ -222,8 +222,6 @@ func StartServer() {
|
||||||
srapi.Use(proxy.SmartShieldMiddleware(
|
srapi.Use(proxy.SmartShieldMiddleware(
|
||||||
utils.SmartShieldPolicy{
|
utils.SmartShieldPolicy{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
PerUserSimultaneous: 8,
|
|
||||||
MaxGlobalSimultaneous: 12,
|
|
||||||
PolicyStrictness: 1,
|
PolicyStrictness: 1,
|
||||||
PerUserRequestLimit: 5000,
|
PerUserRequestLimit: 5000,
|
||||||
},
|
},
|
||||||
|
|
|
@ -240,10 +240,10 @@ func SmartShieldMiddleware(policy utils.SmartShieldPolicy) func(http.Handler) ht
|
||||||
policy.PolicyStrictness = 2 // NORMAL
|
policy.PolicyStrictness = 2 // NORMAL
|
||||||
}
|
}
|
||||||
if(policy.PerUserSimultaneous == 0) {
|
if(policy.PerUserSimultaneous == 0) {
|
||||||
policy.PerUserSimultaneous = 8
|
policy.PerUserSimultaneous = 12
|
||||||
}
|
}
|
||||||
if(policy.MaxGlobalSimultaneous == 0) {
|
if(policy.MaxGlobalSimultaneous == 0) {
|
||||||
policy.MaxGlobalSimultaneous = 50
|
policy.MaxGlobalSimultaneous = 160
|
||||||
}
|
}
|
||||||
if(policy.PrivilegedGroups == 0) {
|
if(policy.PrivilegedGroups == 0) {
|
||||||
policy.PrivilegedGroups = utils.ADMIN
|
policy.PrivilegedGroups = utils.ADMIN
|
||||||
|
|
Loading…
Reference in a new issue