Skip to content

Commit

Permalink
strip version when listen path is stripped
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblakeley committed Jul 13, 2018
1 parent 863fccd commit 02d9fda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions handler_success.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ func (s *SuccessHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) *http
defer s.Base().UpdateRequestSession(r)

versionDef := s.Spec.VersionDefinition
if !s.Spec.VersionData.NotVersioned && versionDef.Location == "url" && versionDef.StripPath {
log.Info(versionDef)
if !s.Spec.VersionData.NotVersioned && versionDef.Location == "url" && s.Spec.Proxy.StripListenPath {
part := s.Spec.getVersionFromRequest(r)

log.Info("Stripping version from url: ", part)
Expand Down Expand Up @@ -294,7 +295,7 @@ func (s *SuccessHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) *http
func (s *SuccessHandler) ServeHTTPWithCache(w http.ResponseWriter, r *http.Request) *http.Response {

versionDef := s.Spec.VersionDefinition
if !s.Spec.VersionData.NotVersioned && versionDef.Location == "url" && versionDef.StripPath {
if !s.Spec.VersionData.NotVersioned && versionDef.Location == "url" && s.Spec.Proxy.StripListenPath {
part := s.Spec.getVersionFromRequest(r)

log.Info("Stripping version from url: ", part)
Expand Down

0 comments on commit 02d9fda

Please sign in to comment.