fix(webdav): add sign for webdav proxy

pull/872/head
Xhofe 2022-03-29 16:34:22 +08:00
parent 7ffaef0de6
commit 83c377270e
1 changed files with 4 additions and 4 deletions

View File

@ -125,10 +125,10 @@ func (fs *FileSystem) Link(w http.ResponseWriter, r *http.Request, rawPath strin
}
if driver.Config().OnlyProxy || account.WebdavProxy {
link = fmt.Sprintf("%s://%s/p%s", protocol, r.Host, rawPath)
if conf.GetBool("check down link") {
sign := utils.SignWithToken(utils.Base(rawPath), conf.Token)
link += "?sign=" + sign
}
//if conf.GetBool("check down link") {
sign := utils.SignWithToken(utils.Base(rawPath), conf.Token)
link += "?sign=" + sign
//}
} else {
link_, err := driver.Link(base.Args{Path: path_, IP: ClientIP(r)}, account)
if err != nil {