mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +00:00
fix: clarify behavior for existing query parameters in downloadFile redirect
This commit is contained in:
@@ -231,6 +231,7 @@ func downloadFile(c fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
q := uri.Query()
|
q := uri.Query()
|
||||||
if len(q) != 0 {
|
if len(q) != 0 {
|
||||||
|
// If there are already query parameters, assume the URL is signed
|
||||||
return c.Redirect().Status(fiber.StatusFound).To(uri.String())
|
return c.Redirect().Status(fiber.StatusFound).To(uri.String())
|
||||||
}
|
}
|
||||||
token, err := utils.GenerateDownloadToken(s)
|
token, err := utils.GenerateDownloadToken(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user