Browse Source

Optimization

Volodymyr Tkach 2 years ago
parent
commit
136db1831b
2 changed files with 0 additions and 2 deletions
  1. 0 1
      utils/http/servauth/servauth.go
  2. 0 1
      utils/http/servlimit/servlimit.go

+ 0 - 1
utils/http/servauth/servauth.go

@@ -18,7 +18,6 @@ func BasicAuth(handler http.Handler, username, password, realm string) http.Hand
 	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 		if username != "" {
 			mRequests.CleanupHourly()
-
 			ip := helpers.ClientIP(r)
 			reqs := mRequests.Count(ip)
 			ltime := mRequests.Time(ip)

+ 0 - 1
utils/http/servlimit/servlimit.go

@@ -18,7 +18,6 @@ func ReqPerSecond(handler http.Handler, requests int) http.Handler {
 	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 		if requests > 0 {
 			mRequests.CleanupHourly()
-
 			ip := helpers.ClientIP(r)
 			reqs := mRequests.Count(ip)
 			ltime := mRequests.Time(ip)