Skip to content

Commit

Permalink
Safely copy paths to new *bo.Options (#672)
Browse files Browse the repository at this point in the history
* Safely copy paths to new *bo.Options

Signed-off-by: jakenichols2719 <[email protected]>

* Add request_params to path members for SetDefaults

Signed-off-by: jakenichols2719 <[email protected]>

* Deleted log--not sure how it got there to begin with

Signed-off-by: jakenichols2719 <[email protected]>

---------

Signed-off-by: jakenichols2719 <[email protected]>
  • Loading branch information
jnichols-git authored Dec 2, 2023
1 parent 961160a commit 6eb6269
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/backends/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ func SetDefaults(
if err != nil {
return nil, err
}
for k, v := range o.Paths {
no.Paths[k] = v.Clone()
}
}

if metadata.IsDefined("backends", name, "alb") {
Expand Down
2 changes: 1 addition & 1 deletion pkg/proxy/paths/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (o *Options) Merge(o2 *Options) {
}

var pathMembers = []string{"path", "match_type", "handler", "methods", "cache_key_params",
"cache_key_headers", "default_ttl_ms", "request_headers", "response_headers",
"cache_key_headers", "default_ttl_ms", "request_params", "request_headers", "response_headers",
"response_headers", "response_code", "response_body", "no_metrics", "collapsed_forwarding",
"req_rewriter_name",
}
Expand Down

0 comments on commit 6eb6269

Please sign in to comment.