This commit is contained in:
parent
a37a1a5ff1
commit
188e007dfd
1 changed files with 9 additions and 0 deletions
9
main.go
9
main.go
|
@ -174,6 +174,15 @@ func beforeAll(next http.HandlerFunc) http.HandlerFunc {
|
|||
|
||||
atomic.AddInt64(&stats_.RequestCount, 1)
|
||||
|
||||
// Too 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", "*")
|
||||
w.Header().Set("Access-Control-Max-Age", "1728000")
|
||||
|
|
Loading…
Reference in a new issue