]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - rounds/transcodeWebP.go
I stopped using Xombrero
[tofuproxy.git] / rounds / transcodeWebP.go
index 016c6178b0ea9b074b6f8b001ca99c2b8d4002ab..7c4995d46c962dd11bbb1a6ef4c508adcf0e28f2 100644 (file)
@@ -25,24 +25,19 @@ import (
        "net/http"
        "os"
        "os/exec"
-       "strings"
 
        "go.stargrave.org/tofuproxy/fifos"
 )
 
 const CmdDWebP = "dwebp"
 
-func isXombrero(req *http.Request) bool {
-       return strings.Contains(req.Header.Get("User-Agent"), "AppleWebKit/538.15")
-}
-
 func RoundTranscodeWebP(
        host string,
        resp *http.Response,
        w http.ResponseWriter,
        req *http.Request,
 ) (bool, error) {
-       if resp.Header.Get("Content-Type") != "image/webp" || isXombrero(req) {
+       if resp.Header.Get("Content-Type") != "image/webp" {
                return true, nil
        }
        tmpFd, err := os.CreateTemp("", "tofuproxy.*.webp")