Skip to content

Commit

Permalink
Merge pull request #11 from Castone22/main
Browse files Browse the repository at this point in the history
Add a path rewrite for /se/file to /file
  • Loading branch information
alcounit authored Feb 13, 2023
2 parents 1651662 + 6e413aa commit 425e1f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ func (app *App) HandleProxy(w http.ResponseWriter, r *http.Request) {
done <- cancel
}()

seUploadPath, uploadPath := "/se/file", "/file"
if strings.HasSuffix(r.URL.Path, seUploadPath) {
r.URL.Path = strings.TrimSuffix(r.URL.Path, seUploadPath) + uploadPath
}
fragments := strings.Split(r.URL.Path, "/")
vars := mux.Vars(r)
id, ok := vars["sessionId"]
Expand Down

0 comments on commit 425e1f6

Please sign in to comment.