Merge remote-tracking branch 'upstream/v2.2' into mrg-current-v2.2
This commit is contained in:
commit
73ca7ad0c1
156 changed files with 1768 additions and 892 deletions
|
@ -19,6 +19,7 @@ type Builder struct {
|
|||
}
|
||||
|
||||
// Build Builds the response modifier.
|
||||
// It returns nil if there is no modifier to apply.
|
||||
func (f *Builder) Build(ctx context.Context, names []string) func(*http.Response) error {
|
||||
var modifiers []func(*http.Response) error
|
||||
|
||||
|
@ -44,7 +45,10 @@ func (f *Builder) Build(ctx context.Context, names []string) func(*http.Response
|
|||
for _, name := range conf.Chain.Middlewares {
|
||||
qualifiedNames = append(qualifiedNames, provider.GetQualifiedName(chainCtx, name))
|
||||
}
|
||||
modifiers = append(modifiers, f.Build(ctx, qualifiedNames))
|
||||
|
||||
if rm := f.Build(ctx, qualifiedNames); rm != nil {
|
||||
modifiers = append(modifiers, rm)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,5 +64,5 @@ func (f *Builder) Build(ctx context.Context, names []string) func(*http.Response
|
|||
}
|
||||
}
|
||||
|
||||
return func(response *http.Response) error { return nil }
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue