fix!: sign with the raw path instead of filename (#2258)

This commit is contained in:
Gerhard Tan
2022-11-11 16:24:25 +08:00
committed by GitHub
parent 1743110a70
commit 00de9bf16d
6 changed files with 15 additions and 16 deletions

View File

@ -231,7 +231,7 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (sta
u := fmt.Sprintf("%s/p%s?sign=%s",
common.GetApiUrl(r),
utils.EncodePath(reqPath, true),
sign.Sign(path.Base(reqPath)))
sign.Sign(reqPath))
w.Header().Set("Cache-Control", "max-age=0, no-cache, no-store, must-revalidate")
http.Redirect(w, r, u, 302)
} else {