v0.3.0-unstable6

This commit is contained in:
Yann Stepienik 2023-04-30 21:36:51 +01:00
parent 229a14d4a2
commit 99736aa2a9
3 changed files with 3 additions and 3 deletions

View file

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

View file

@ -229,7 +229,7 @@ func StartServer() {
}, },
)) ))
srapi.Use(utils.MiddlewareTimeout(20 * time.Second)) srapi.Use(utils.MiddlewareTimeout(20 * time.Second))
// srapi.Use(utils.BlockPostWithoutReferer) srapi.Use(utils.BlockPostWithoutReferer)
srapi.Use(proxy.BotDetectionMiddleware) srapi.Use(proxy.BotDetectionMiddleware)
srapi.Use(httprate.Limit(60, 1*time.Minute, srapi.Use(httprate.Limit(60, 1*time.Minute,
httprate.WithKeyFuncs(httprate.KeyByIP), httprate.WithKeyFuncs(httprate.KeyByIP),

View file

@ -240,7 +240,7 @@ 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 = 2 policy.PerUserSimultaneous = 5
} }
if(policy.MaxGlobalSimultaneous == 0) { if(policy.MaxGlobalSimultaneous == 0) {
policy.MaxGlobalSimultaneous = 50 policy.MaxGlobalSimultaneous = 50