mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-23 11:39:32 +02:00
proxy: remove unused setting AuthorizeInternalAddr (#93)
- Added unit tests for policy validation. - Removed extraneous policy validation for URLs. - Add dependency caching to dockerfile.
This commit is contained in:
parent
96f4b8bd61
commit
fbe1cae482
10 changed files with 61 additions and 56 deletions
|
@ -35,7 +35,7 @@ type StateParameter struct {
|
|||
RedirectURI string `json:"redirect_uri"`
|
||||
}
|
||||
|
||||
// Handler returns a http handler for an Proxy
|
||||
// Handler returns a http handler for a Proxy
|
||||
func (p *Proxy) Handler() http.Handler {
|
||||
// routes
|
||||
mux := http.NewServeMux()
|
||||
|
@ -71,10 +71,9 @@ func (p *Proxy) Handler() http.Handler {
|
|||
c = c.Append(middleware.ValidateHost(p.mux))
|
||||
|
||||
// serve the middleware and mux
|
||||
h := c.Then(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
return c.Then(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
mux.ServeHTTP(w, r)
|
||||
}))
|
||||
return h
|
||||
}
|
||||
|
||||
// RobotsTxt sets the User-Agent header in the response to be "Disallow"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue