Skip to content

Commit

Permalink
fix: set path prefix for http ext auth service (envoyproxy#3018)
Browse files Browse the repository at this point in the history
Signed-off-by: huabing zhao <[email protected]>
  • Loading branch information
zhaohuabing committed Mar 27, 2024
1 parent a2d40c2 commit ccf91b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/xds/translator/extauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,13 @@ func httpService(http *ir.HTTPExtAuthService) *extauthv3.HttpService {
var (
uri string
headersToBackend []*matcherv3.StringMatcher
service = new(extauthv3.HttpService)
service *extauthv3.HttpService
)

service = &extauthv3.HttpService{
PathPrefix: http.Path,
}

u := url.URL{
// scheme should be decided by the TLS setting, but we don't have that info now.
// It's safe to set it to http because the ext auth filter doesn't use the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
patterns:
- exact: header1
- exact: header2
pathPrefix: /auth
serverUri:
cluster: securitypolicy/default/policy-for-gateway-1/envoy-gateway/http-backend
timeout: 10s
Expand Down

0 comments on commit ccf91b9

Please sign in to comment.