1
0
Fork 0

refactor: Enhance rules tests.

- refactor: change incorrect package.
- refactor: test readability.
This commit is contained in:
Fernandez Ludovic 2017-05-28 05:50:03 +02:00 committed by Ludovic Fernandez
parent cbccdd51c5
commit b6c5c14447
7 changed files with 171 additions and 150 deletions

View file

@ -40,7 +40,7 @@ func (s *StripPrefixRegex) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
r.URL.Path = r.URL.Path[len(prefix.Path):]
r.Header[forwardedPrefixHeader] = []string{prefix.Path}
r.Header.Add(ForwardedPrefixHeader, prefix.Path)
r.RequestURI = r.URL.RequestURI()
s.Handler.ServeHTTP(w, r)
return