mirror of https://github.com/Xhofe/alist
fix: missed encode path while use down proxy (close #2208)
parent
18cd45d257
commit
26a29f20c3
|
@ -272,7 +272,10 @@ func FsGet(c *gin.Context) {
|
||||||
}
|
}
|
||||||
if storage.Config().MustProxy() || storage.GetStorage().WebProxy {
|
if storage.Config().MustProxy() || storage.GetStorage().WebProxy {
|
||||||
if storage.GetStorage().DownProxyUrl != "" {
|
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 {
|
} else {
|
||||||
rawURL = fmt.Sprintf("%s/p%s?sign=%s",
|
rawURL = fmt.Sprintf("%s/p%s?sign=%s",
|
||||||
common.GetApiUrl(c.Request),
|
common.GetApiUrl(c.Request),
|
||||||
|
|
Loading…
Reference in New Issue