mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2026-01-28 01:21:16 +00:00
gofmt
This commit is contained in:
@@ -35,11 +35,11 @@ func handleMedia(c *fiber.Ctx, url string) error {
|
||||
utils.SetHeaders(c)
|
||||
|
||||
if utils.Config.ForceWebp &&
|
||||
!strings.HasSuffix(c.Path(), ".webp") &&
|
||||
c.Get("Sec-Fetch-Dest") == "image" &&
|
||||
c.Query("no_webp") == "" &&
|
||||
c.Accepts("image/webp") == "image/webp" &&
|
||||
!strings.HasPrefix(c.Path(), "/stack") {
|
||||
!strings.HasSuffix(c.Path(), ".webp") &&
|
||||
c.Get("Sec-Fetch-Dest") == "image" &&
|
||||
c.Query("no_webp") == "" &&
|
||||
c.Accepts("image/webp") == "image/webp" &&
|
||||
!strings.HasPrefix(c.Path(), "/stack") {
|
||||
url = strings.ReplaceAll(url, ".png", ".webp")
|
||||
url = strings.ReplaceAll(url, ".jpg", ".webp")
|
||||
url = strings.ReplaceAll(url, ".jpeg", ".webp")
|
||||
|
||||
Reference in New Issue
Block a user