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:
Bobby DeSimone 2019-04-24 13:28:29 -07:00 committed by GitHub
parent 96f4b8bd61
commit fbe1cae482
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 61 additions and 56 deletions

View file

@ -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"