mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-05 04:13:11 +02:00
proxy: handle double slash in paths
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
b373634012
commit
21e215ccea
4 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -247,6 +247,8 @@ func NewReverseProxy(to *url.URL) *httputil.ReverseProxy {
|
|||
// each route has a custom set of middleware applied to the reverse proxy
|
||||
func (p *Proxy) newReverseProxyHandler(rp http.Handler, route *config.Policy) (http.Handler, error) {
|
||||
r := pom_httputil.NewRouter()
|
||||
r.SkipClean(true)
|
||||
r.StrictSlash(true)
|
||||
r.Use(middleware.StripPomeriumCookie(p.cookieName))
|
||||
// if signing key is set, add signer to middleware
|
||||
if len(p.signingKey) != 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue