Skip to content

Commit

Permalink
add prefix rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
KSmigielski committed Nov 12, 2024
1 parent 7fb4b8e commit 38583fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ class AuthorizationProperties {
class CustomRuteProperties {
var enabled = false
var cluster = "custom"
var prefixRewrite = ""
var path = StringMatcher()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ class CustomRoutesFactory(properties: RoutesProperties) {
.setName(it.cluster)
.setRoute(RouteAction.newBuilder()
.setCluster(it.cluster)
.also { route ->
if (it.prefixRewrite != "") {
route.setPrefixRewrite(it.prefixRewrite)
}
}
)
.setMatch(matcher)
.build()
Expand Down

0 comments on commit 38583fe

Please sign in to comment.