upstream endpoints load balancer weights (#1830)

This commit is contained in:
wasaga 2021-01-28 09:11:14 -05:00 committed by GitHub
parent 3567183ce5
commit 67f6030e1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1190 additions and 778 deletions

View file

@ -134,8 +134,8 @@ func (a *Authorize) getGoogleCloudServerlessAuthenticationHeaders(reply *evaluat
serviceAccount := a.currentOptions.Load().GoogleCloudServerlessAuthenticationServiceAccount
var hostname string
if len(reply.MatchingPolicy.Destinations) > 0 {
hostname = reply.MatchingPolicy.Destinations[0].Hostname()
if len(reply.MatchingPolicy.To) > 0 {
hostname = reply.MatchingPolicy.To[0].URL.Hostname()
}
audience := fmt.Sprintf("https://%s", hostname)