mirror of
https://git.phreedom.club/localhost_frssoft/compy.git
synced 2024-11-23 08:31:29 +00:00
webp everywhere if possible (clients may be confused...)
This commit is contained in:
parent
ac99d6b3a8
commit
59c6349ced
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue