Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorVladimir Shushlin <v.shushlin@gmail.com>2021-12-09 17:17:17 +0300
committerVladimir Shushlin <v.shushlin@gmail.com>2021-12-20 14:10:35 +0300
commit91dd7bc9011640dd02b497acf9fa78bee35a8402 (patch)
treea42e4d7ca3b2d169fc8454952ff90e2075589481 /app.go
parentf8512edbec4ec83b426c8ca2dda467de424685e4 (diff)
refactor: handle defaults in ratelimiter package itself
also fix tests: * float64(1/time.Milesecond) == 0 * rate package doesn't actually refill the bucket on fractional seconds, so we need to use integers
Diffstat (limited to 'app.go')
-rw-r--r--app.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app.go b/app.go
index 84eb8956..a552bfd3 100644
--- a/app.go
+++ b/app.go
@@ -258,7 +258,7 @@ func (a *theApp) buildHandlerPipeline() (http.Handler, error) {
handler = routing.NewMiddleware(handler, a.source)
- handler = handlers.Ratelimiter(handler, a.config)
+ handler = handlers.Ratelimiter(handler, &a.config.RateLimit)
// Health Check
handler, err = a.healthCheckMiddleware(handler)