-
Notifications
You must be signed in to change notification settings - Fork 183
bugfix: path-based header injection #851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
pkg/backends/alb/options/options.go
Outdated
| if !y.IsDefined("backends", name, providers.ALB) { | ||
| return nil, nil | ||
| func (o *Options) Initialize(_ string) error { | ||
| if strings.HasPrefix(o.MechanismName, "tsm") && o.MechanismName != "tsm" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth adding a constant for this? and perhaps "fgr"?
pkg/backends/influxdb/routes_test.go
Outdated
| found := false | ||
| for _, pathConfig := range rsc.BackendOptions.Paths { | ||
| if pathConfig.Path == "/" { | ||
| found = true | ||
| break | ||
| } | ||
| } | ||
| if !found { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this seems to be repeated in many tests, you could implement this as
| found := false | |
| for _, pathConfig := range rsc.BackendOptions.Paths { | |
| if pathConfig.Path == "/" { | |
| found = true | |
| break | |
| } | |
| } | |
| if !found { | |
| if slices.ContainsFunc([]*po.Options(rsc.BackendOptions.Paths), func(pathConfig *po.Options) bool { | |
| return pathConfig.Path == "/" | |
| }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swapped this pattern across all of pkg to use slices.Contains or slices.ContainsFunc instead.
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
Signed-off-by: James Ranson <[email protected]>
This is a major overhaul of how Paths work, along with standardization of all
*Optionsusing aConfigOptionsinterface.Overlayfunction fixes Custom paths not effective #671Optionsnow have standardValidate,InitializeandClonefunctions from theConfigOptionsinterface, and properly separate concerns (e.g., Validate functions no longer mutate the object being validated)OverlayYAMLDatais removed in favor ofUnmarshalYAMLhelper functions and aloaderOptionshelper struct that accomplish the same thingyamlxpackage is retired/removed