Skip to content

Commit

Permalink
fix: pass query params along in shim (#1185)
Browse files Browse the repository at this point in the history
* fix: pass query params along in shim

* fix: use fmt.Sprintf instead
  • Loading branch information
subomi authored Nov 25, 2022
1 parent 900573a commit e529b4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2022-11-01 22:34:19.592986 +0100 WAT m=+92.191655834
// 2022-11-25 12:34:55.007396 +0100 WAT m=+88.430925168
package docs

import (
Expand Down
3 changes: 1 addition & 2 deletions server/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ func (a *ApplicationHandler) RedirectToProjects(w http.ResponseWriter, r *http.R

if ok := contains(redirectRoutes, resourcePrefix); ok {
forwardedPath := strings.Join(rElems[3:], "/")
redirectPrefix := fmt.Sprintf("/api/v1/projects/%s/", groupID)
redirectURL := redirectPrefix + forwardedPath
redirectURL := fmt.Sprintf("/api/v1/projects/%s/%s?%s", groupID, forwardedPath, r.URL.RawQuery)

http.Redirect(w, r, redirectURL, http.StatusTemporaryRedirect)
}
Expand Down

0 comments on commit e529b4c

Please sign in to comment.