From 59c6349cedfc87b96c04f1bd43dcc0a5ce1078ba Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Sat, 7 Jan 2023 02:51:41 +0300 Subject: [PATCH] webp everywhere if possible (clients may be confused...) --- transcoder/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transcoder/util.go b/transcoder/util.go index f8711ea..1fd4ad4 100644 --- a/transcoder/util.go +++ b/transcoder/util.go @@ -7,7 +7,7 @@ import ( func SupportsWebP(headers http.Header) bool { for _, v := range strings.Split(headers.Get("Accept"), ",") { - if strings.SplitN(v, ";", 2)[0] == "image/webp" { + if strings.SplitN(v, ";", 2)[0] == "image/webp" || strings.SplitN(v, ";", 2)[0] == "*/*" || strings.SplitN(v, ";", 2)[0] == "" { return true } }