mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
preserve incoming query params in success_action_redirect (#15280)
fixes #15274
This commit is contained in:
@@ -1116,9 +1116,10 @@ func (api objectAPIHandlers) PostPolicyBucketHandler(w http.ResponseWriter, r *h
|
||||
Host: handlers.GetSourceIP(r),
|
||||
})
|
||||
|
||||
if successRedirect != "" {
|
||||
// Replace raw query params..
|
||||
redirectURL.RawQuery = getRedirectPostRawQuery(objInfo)
|
||||
if redirectURL != nil { // success_action_redirect is valid and set.
|
||||
redirectURL.Query().Add("bucket", objInfo.Bucket)
|
||||
redirectURL.Query().Add("key", objInfo.Name)
|
||||
redirectURL.Query().Add("etag", "\""+objInfo.ETag+"\"")
|
||||
writeRedirectSeeOther(w, redirectURL.String())
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user