Feature/path rewrite#288
Conversation
| ConnectionProxyHeaderAnnotation = "nginx.ingress.kubernetes.io/connection-proxy-header" | ||
| CustomHeadersAnnotation = "nginx.ingress.kubernetes.io/custom-headers" | ||
|
|
||
| // R2gex |
There was a problem hiding this comment.
| // R2gex | |
| // Regex |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: robscott, Stevenjin8 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e6048d3 to
d0a4795
Compare
mikemorris
left a comment
There was a problem hiding this comment.
Logic looks good, just a minor nit on the IR structure/naming.
| // Headers to add on path rewrite. | ||
| Headers map[string]string |
There was a problem hiding this comment.
Does this belong inside PathRewrite? The logic below looks correct, just feels like either an odd structure or struct name (versus something like RequestRewrite if paths and headers should be siblings).
There was a problem hiding this comment.
You mean Headers? Yeah its not clear to me either. Generally, its nice for one function to worry about one IR field, that way you don't have to worry about things already existing.
There was a problem hiding this comment.
Yea having Headers as a field inside the PathRewrite struct feels weird...
There was a problem hiding this comment.
oh I remember now why I did it this way. Since headers are pretty straightforward, they aren't really IR, they are just added as a header modifier and it felt weird to add that header into the HTTPRoute, but leave the PathRewrite stuff for later.
|
/lgtm |
* non-regex rewrites * handle regex paths * non-nil map * fix tests * lint * lint and test
depends on #283
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: