mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 08:19:23 +02:00
Add automatic configuration reloading and
policy handling
This commit is contained in:
parent
77f3933560
commit
8c2beac6f1
12 changed files with 287 additions and 34 deletions
|
@ -423,14 +423,6 @@ func (p *Proxy) authenticate(w http.ResponseWriter, r *http.Request, session *se
|
|||
return nil
|
||||
}
|
||||
|
||||
// Handle constructs a route from the given host string and matches it to the provided http.Handler and UpstreamConfig
|
||||
func (p *Proxy) Handle(host string, handler http.Handler, pol *policy.Policy) {
|
||||
p.routeConfigs[host] = &routeConfig{
|
||||
mux: handler,
|
||||
policy: *pol,
|
||||
}
|
||||
}
|
||||
|
||||
// router attempts to find a route for a request. If a route is successfully matched,
|
||||
// it returns the route information and a bool value of `true`. If a route can not be matched,
|
||||
// a nil value for the route and false bool value is returned.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue