Skip to content

Commit

Permalink
refactor: fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Plotnikov <[email protected]>
  • Loading branch information
Philipp-Plotnikov committed Jan 29, 2024
1 parent 78c6747 commit 567863a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/plugin/httproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ func (r *RpcPlugin) setHTTPHeaderRoute(rollout *v1alpha1.Rollout, headerRouting
}
switch {
case headerRule.HeaderValue.Exact != "":
headerMatchType := v1beta1.HeaderMatchType(v1beta1.HeaderMatchExact)
headerMatchType := v1beta1.HeaderMatchExact
httpHeaderRouteRule.Type = &headerMatchType
httpHeaderRouteRule.Value = headerRule.HeaderValue.Exact
case headerRule.HeaderValue.Prefix != "":
headerMatchType := v1beta1.HeaderMatchType(v1beta1.HeaderMatchRegularExpression)
headerMatchType := v1beta1.HeaderMatchRegularExpression
httpHeaderRouteRule.Type = &headerMatchType
httpHeaderRouteRule.Value = headerRule.HeaderValue.Prefix + "*"
case headerRule.HeaderValue.Regex != "":
headerMatchType := v1beta1.HeaderMatchType(v1beta1.HeaderMatchRegularExpression)
headerMatchType := v1beta1.HeaderMatchRegularExpression
httpHeaderRouteRule.Type = &headerMatchType
httpHeaderRouteRule.Value = headerRule.HeaderValue.Regex
default:
Expand Down

0 comments on commit 567863a

Please sign in to comment.