]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - rounds/05noHead.go
Xombrero does not send User-Agent with HEAD
[tofuproxy.git] / rounds / 05noHead.go
index 2396e02a3f58fe3050b6a25d85d8772515b87b49..e382432f21b0741eb3bd469309bb375286f1c4bc 100644 (file)
@@ -19,20 +19,15 @@ package rounds
 
 import (
        "net/http"
-       "strings"
 )
 
-func isXombrero(req *http.Request) bool {
-       return strings.Contains(req.Header.Get("User-Agent"), "AppleWebKit/538.15")
-}
-
 func RoundNoHead(
        host string,
        resp *http.Response,
        w http.ResponseWriter,
        req *http.Request,
 ) (bool, error) {
-       if req.Method == http.MethodHead && isXombrero(req) {
+       if req.Method == http.MethodHead {
                http.Error(w, "deny HEAD", http.StatusMethodNotAllowed)
                return false, nil
        }