mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-23 14:07:11 +02:00
config: support multiple destination addresses (#1789)
* config: support multiple destination addresses * use constructor for string slice * add docs * add test for multiple destinations * fix name
This commit is contained in:
parent
c6b6141d12
commit
a4c7381eba
22 changed files with 556 additions and 191 deletions
|
@ -133,7 +133,11 @@ func (a *Authorize) getGoogleCloudServerlessAuthenticationHeaders(reply *evaluat
|
|||
}
|
||||
|
||||
serviceAccount := a.currentOptions.Load().GoogleCloudServerlessAuthenticationServiceAccount
|
||||
audience := fmt.Sprintf("https://%s", reply.MatchingPolicy.Destination.Hostname())
|
||||
var hostname string
|
||||
if len(reply.MatchingPolicy.Destinations) > 0 {
|
||||
hostname = reply.MatchingPolicy.Destinations[0].Hostname()
|
||||
}
|
||||
audience := fmt.Sprintf("https://%s", hostname)
|
||||
|
||||
src, err := getGoogleCloudServerlessTokenSource(serviceAccount, audience)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue