mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 08:19:23 +02:00
proxy: support external access control requests (#324)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
7abcf650e5
commit
eaa1e7a4fb
11 changed files with 730 additions and 133 deletions
|
@ -173,6 +173,11 @@ func (p *Proxy) UpdatePolicies(opts *config.Options) error {
|
|||
r.HandleFunc("/robots.txt", p.RobotsTxt).Methods(http.MethodGet)
|
||||
r = p.registerHelperHandlers(r)
|
||||
|
||||
if opts.ForwardAuthURL != nil {
|
||||
// create a route to handle forward auth requests
|
||||
r.Host(opts.ForwardAuthURL.Host).Subrouter().PathPrefix("/")
|
||||
}
|
||||
|
||||
for _, policy := range opts.Policies {
|
||||
if err := policy.Validate(); err != nil {
|
||||
return fmt.Errorf("proxy: invalid policy %s", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue