Skip to content

Commit

Permalink
fix: missed encode path while use down proxy (close #2208)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Nov 6, 2022
1 parent 18cd45d commit 26a29f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/handles/fsread.go
Expand Up @@ -272,7 +272,10 @@ func FsGet(c *gin.Context) {
}
if storage.Config().MustProxy() || storage.GetStorage().WebProxy {
if storage.GetStorage().DownProxyUrl != "" {
rawURL = fmt.Sprintf("%s%s?sign=%s", strings.Split(storage.GetStorage().DownProxyUrl, "\n")[0], req.Path, sign.Sign(obj.GetName()))
rawURL = fmt.Sprintf("%s%s?sign=%s",
strings.Split(storage.GetStorage().DownProxyUrl, "\n")[0],
utils.EncodePath(req.Path, true),
sign.Sign(obj.GetName()))
} else {
rawURL = fmt.Sprintf("%s/p%s?sign=%s",
common.GetApiUrl(c.Request),
Expand Down

0 comments on commit 26a29f2

Please sign in to comment.