proxy: handle double slash in paths

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
Bobby DeSimone 2019-09-16 20:34:04 -07:00
parent b373634012
commit 21e215ccea
No known key found for this signature in database
GPG key ID: AEE4CF12FE86D07E
4 changed files with 7 additions and 1 deletions

View file

@ -20,7 +20,9 @@ import (
// Handler returns the proxy service's ServeMux
func (p *Proxy) Handler() http.Handler {
r := httputil.NewRouter().StrictSlash(true)
r := httputil.NewRouter()
r.SkipClean(true)
r.StrictSlash(true)
r.Use(middleware.ValidateHost(func(host string) bool {
_, ok := p.routeConfigs[host]
return ok