Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1152 from aandryashin/master
Browse files Browse the repository at this point in the history
Fixed file upload.
  • Loading branch information
vania-pooh authored Nov 5, 2021
2 parents 389ab02 + d6fc603 commit 069df4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions selenoid.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,10 @@ func proxy(w http.ResponseWriter, r *http.Request) {
return
}
}
seUploadPath, uploadPath := "/se/file", "/file"
if strings.HasSuffix(r.URL.Path, seUploadPath) {
r.URL.Path = strings.TrimSuffix(r.URL.Path, seUploadPath)+uploadPath
}
r.URL.Host, r.URL.Path = sess.URL.Host, path.Clean(sess.URL.Path+r.URL.Path)
r.Host = "localhost"
return
Expand Down

0 comments on commit 069df4a

Please sign in to comment.