mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 08:50:42 +02:00
config: fix databroker policies (#1821)
This commit is contained in:
parent
bcc8c17855
commit
84e8f6cc05
11 changed files with 42 additions and 20 deletions
|
@ -181,8 +181,8 @@ func buildPolicyRoutes(options *config.Options, domain string) []*envoy_config_r
|
|||
var routes []*envoy_config_route_v3.Route
|
||||
responseHeadersToAdd := toEnvoyHeaders(options.Headers)
|
||||
|
||||
for i := range options.Policies {
|
||||
policy := options.Policies[i]
|
||||
for i, p := range options.GetAllPolicies() {
|
||||
policy := p
|
||||
if !hostMatchesDomain(policy.Source.URL, domain) {
|
||||
continue
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ func setHostRewriteOptions(policy *config.Policy, action *envoy_config_route_v3.
|
|||
}
|
||||
|
||||
func hasPublicPolicyMatchingURL(options *config.Options, requestURL *url.URL) bool {
|
||||
for _, policy := range options.Policies {
|
||||
for _, policy := range options.GetAllPolicies() {
|
||||
if policy.AllowPublicUnauthenticatedAccess && policy.Matches(requestURL) {
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue