mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 10:26:29 +02:00
Merge pull request #133 from nareddyt/bug-route-config-addresses
proxy: fix bug with incorrect addressing causing invalid route configs
This commit is contained in:
commit
c53c07c274
2 changed files with 3 additions and 3 deletions
|
@ -298,7 +298,7 @@ func (p *Proxy) authenticate(w http.ResponseWriter, r *http.Request, session *se
|
|||
func (p *Proxy) Handle(host string, handler http.Handler, pol *policy.Policy) {
|
||||
p.routeConfigs[host] = &routeConfig{
|
||||
mux: handler,
|
||||
policy: pol,
|
||||
policy: *pol,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,7 +319,7 @@ func (p *Proxy) router(r *http.Request) (http.Handler, bool) {
|
|||
func (p *Proxy) policy(r *http.Request) (*policy.Policy, bool) {
|
||||
config, ok := p.routeConfigs[r.Host]
|
||||
if ok {
|
||||
return config.policy, true
|
||||
return &config.policy, true
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ type Proxy struct {
|
|||
|
||||
type routeConfig struct {
|
||||
mux http.Handler
|
||||
policy *policy.Policy
|
||||
policy policy.Policy
|
||||
}
|
||||
|
||||
// New takes a Proxy service from options and a validation function.
|
||||
|
|
Loading…
Add table
Reference in a new issue