diff --git a/httppaths.go b/httppaths.go index 23e00d4..7352a2d 100644 --- a/httppaths.go +++ b/httppaths.go @@ -67,7 +67,6 @@ func videoplayback(w http.ResponseWriter, req *http.Request) { request, err := http.NewRequest("POST", proxyURL.String(), bytes.NewReader(body)) - copyHeaders(req.Header, request.Header, false) request.Header.Set("User-Agent", ua) if err != nil { log.Panic(err) diff --git a/main.go b/main.go index ec5c0cd..ef24e61 100644 --- a/main.go +++ b/main.go @@ -174,14 +174,9 @@ func beforeAll(next http.HandlerFunc) http.HandlerFunc { atomic.AddInt64(&stats_.RequestCount, 1) - // Too look like more like a browser + // To look like more like a browser req.Header.Add("Origin", "https://www.youtube.com") - req.Header.Add("Pargma", "no-cache") - req.Header.Add("Priority", "u=1, i") req.Header.Add("Referer", "https://www.youtube.com/") - req.Header.Add("sec-fetch-dest", "empty") - req.Header.Add("sec-fetch-mode", "cors") - req.Header.Add("sec-fetch-site", "cross-site") w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Headers", "*")