Skip to content

Commit e60cbf4

Browse files
committed
refactor(mutate): get redirect path from session.prefixReqPath
1 parent 9369ad2 commit e60cbf4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/serverHandler/mutate.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package serverHandler
22

33
import (
44
"net/http"
5-
"strings"
65
)
76

87
func (h *aliasHandler) mutate(w http.ResponseWriter, r *http.Request, session *sessionContext, data *responseData) {
@@ -41,11 +40,7 @@ func (h *aliasHandler) mutate(w http.ResponseWriter, r *http.Request, session *s
4140
w.Write([]byte(`{"success":false}`))
4241
}
4342
} else {
44-
reqPath := r.RequestURI
45-
qsIndex := strings.IndexByte(reqPath, '?')
46-
if qsIndex >= 0 {
47-
reqPath = reqPath[:qsIndex]
48-
}
43+
reqPath := session.prefixReqPath
4944

5045
ctxQsList := r.Form["contextquerystring"]
5146
ctxQsListLen := len(ctxQsList)

0 commit comments

Comments
 (0)