]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - rounds/40transcodeWebP.go
Xombrero does not send User-Agent with HEAD
[tofuproxy.git] / rounds / 40transcodeWebP.go
index 43938ec97672c93a8daf17bb69bed67246f6e673..ff1fd8c7b3c673c0216e4436db6333619c694054 100644 (file)
@@ -25,12 +25,17 @@ 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,