diff --git a/pkg/middlewares/canary/canary.go b/pkg/middlewares/canary/canary.go index 94197bafb4..845d951f47 100644 --- a/pkg/middlewares/canary/canary.go +++ b/pkg/middlewares/canary/canary.go @@ -23,7 +23,7 @@ const ( headerAuth = "Authorization" headerUA = "User-Agent" headerXCanary = "X-Canary" - headerXRequestID = "X-Request-ID" + headerXRequestID = "X-Request-Id" defaultCacheSize = 100000 defaultExpiration = time.Minute * 10 defaultCacheCleanDuration = time.Minute * 20 diff --git a/pkg/middlewares/ratelimiter/rate_limiter.go b/pkg/middlewares/ratelimiter/rate_limiter.go index 3673a10e3e..4bcf345502 100644 --- a/pkg/middlewares/ratelimiter/rate_limiter.go +++ b/pkg/middlewares/ratelimiter/rate_limiter.go @@ -121,7 +121,7 @@ func (rl *rateLimiter) ServeHTTP(w http.ResponseWriter, r *http.Request) { bucket = rlSource.(*rate.Limiter) } else { bucket = rate.NewLimiter(rl.rate, int(rl.burst)) - if err := rl.buckets.Set(source, bucket, int(rl.maxDelay)*10+1); err != nil { + if err := rl.buckets.Set(source, bucket, int(rl.maxDelay/time.Second)*10+1); err != nil { logger.Errorf("could not insert bucket: %v", err) http.Error(w, "could not insert bucket", http.StatusInternalServerError) return