Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set path prefix for http ext auth service #3018

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading