mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-21 12:08:19 +02:00
envoyconfig: fix tls_downstream_client_ca for non-standard ports (#2802)
This commit is contained in:
parent
8331db9a26
commit
d0890d399c
2 changed files with 2 additions and 2 deletions
|
@ -853,7 +853,7 @@ func hostMatchesDomain(u *url.URL, host string) bool {
|
||||||
func getPoliciesForDomain(options *config.Options, domain string) []config.Policy {
|
func getPoliciesForDomain(options *config.Options, domain string) []config.Policy {
|
||||||
var policies []config.Policy
|
var policies []config.Policy
|
||||||
for _, p := range options.GetAllPolicies() {
|
for _, p := range options.GetAllPolicies() {
|
||||||
if p.Source != nil && hostMatchesDomain(p.Source.URL, domain) {
|
if p.Source != nil && p.Source.URL.Hostname() == domain {
|
||||||
policies = append(policies, p)
|
policies = append(policies, p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -604,7 +604,7 @@ func Test_buildDownstreamTLSContext(t *testing.T) {
|
||||||
Key: aExampleComKey,
|
Key: aExampleComKey,
|
||||||
Policies: []config.Policy{
|
Policies: []config.Policy{
|
||||||
{
|
{
|
||||||
Source: &config.StringURL{URL: mustParseURL(t, "https://a.example.com")},
|
Source: &config.StringURL{URL: mustParseURL(t, "https://a.example.com:1234")},
|
||||||
TLSDownstreamClientCA: "TEST",
|
TLSDownstreamClientCA: "TEST",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue