From b156a5242009da39ca2ff1b4d7d6f675656a6e5e Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sat, 21 Dec 2024 14:53:33 -0300 Subject: [PATCH] test --- httppaths.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/httppaths.go b/httppaths.go index c57f3e1..86c3eda 100644 --- a/httppaths.go +++ b/httppaths.go @@ -216,13 +216,12 @@ func vi(w http.ResponseWriter, req *http.Request) { proxyURL.RawQuery = q.Encode() request, err := http.NewRequest(req.Method, proxyURL.String(), nil) - - copyHeaders(req.Header, request.Header, false) - request.Header.Set("User-Agent", default_ua) if err != nil { log.Panic(err) } + request.Header.Set("User-Agent", default_ua) + resp, err := client.Do(request) if err != nil { log.Panic(err) @@ -236,8 +235,8 @@ func vi(w http.ResponseWriter, req *http.Request) { defer resp.Body.Close() - NoRewrite := strings.HasPrefix(resp.Header.Get("Content-Type"), "audio") || strings.HasPrefix(resp.Header.Get("Content-Type"), "video") - copyHeaders(resp.Header, w.Header(), NoRewrite) + // NoRewrite := strings.HasPrefix(resp.Header.Get("Content-Type"), "audio") || strings.HasPrefix(resp.Header.Get("Content-Type"), "video") + // copyHeaders(resp.Header, w.Header(), NoRewrite) w.WriteHeader(resp.StatusCode) io.Copy(w, resp.Body)