Browse Source

v0.3.0-unstable6

Yann Stepienik 2 năm trước cách đây
mục cha
commit
99736aa2a9
3 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 1 1
      package.json
  2. 1 1
      src/httpServer.go
  3. 1 1
      src/proxy/shield.go

+ 1 - 1
package.json

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

+ 1 - 1
src/httpServer.go

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

+ 1 - 1
src/proxy/shield.go

@@ -240,7 +240,7 @@ func SmartShieldMiddleware(policy utils.SmartShieldPolicy) func(http.Handler) ht
 			policy.PolicyStrictness = 2 // NORMAL
 		}
 		if(policy.PerUserSimultaneous == 0) {
-			policy.PerUserSimultaneous = 2
+			policy.PerUserSimultaneous = 5
 		}
 		if(policy.MaxGlobalSimultaneous == 0) {
 			policy.MaxGlobalSimultaneous = 50