fix: disable cache for 302 redirect (close #2216)
This commit is contained in:
@ -232,6 +232,7 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (sta
|
||||
common.GetApiUrl(r),
|
||||
utils.EncodePath(reqPath, true),
|
||||
sign.Sign(path.Base(reqPath)))
|
||||
w.Header().Set("Cache-Control", "max-age=0, no-cache, no-store, must-revalidate")
|
||||
http.Redirect(w, r, u, 302)
|
||||
} else {
|
||||
link, _, err := fs.Link(ctx, reqPath, model.LinkArgs{IP: utils.ClientIP(r)})
|
||||
|
Reference in New Issue
Block a user