Fix error without query params

This commit is contained in:
video-prize-ranch 2022-10-06 06:53:24 -04:00
parent b6d400688f
commit 23499a9710
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ func handleMedia(c *fiber.Ctx, url string) error {
url = strings.ReplaceAll(url, ".jpeg", ".webp")
}
if strings.HasPrefix(c.Path(), "/stack") {
if strings.HasPrefix(c.Path(), "/stack") && strings.Contains(c.OriginalURL(), "?") {
url = url + "?" + strings.Split(c.OriginalURL(), "?")[1]
}