1
0
Fork 0

ratelimit: do not default to ipstrategy too early

This commit is contained in:
mpl 2020-04-29 18:32:05 +02:00 committed by GitHub
parent 97294df84f
commit 4da63c9237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 58 additions and 27 deletions

View file

@ -23,6 +23,7 @@ type inFlightReq struct {
}
// New creates a max request middleware.
// If no source criterion is provided in the config, it defaults to RequestHost.
func New(ctx context.Context, next http.Handler, config dynamic.InFlightReq, name string) (http.Handler, error) {
ctxLog := log.With(ctx, log.Str(log.MiddlewareName, name), log.Str(log.MiddlewareType, typeName))
log.FromContext(ctxLog).Debug("Creating middleware")