mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Avoid override for X-Client headers
This commit is contained in:
parent
dad885c051
commit
7aada3f328
1 changed files with 3 additions and 3 deletions
|
@ -89,9 +89,9 @@ class HTTPClient < HTTP::Client
|
||||||
|
|
||||||
def exec(request)
|
def exec(request)
|
||||||
if self.host == "www.youtube.com"
|
if self.host == "www.youtube.com"
|
||||||
request.headers["x-youtube-client-name"] = "1"
|
request.headers["x-youtube-client-name"] ||= "1"
|
||||||
request.headers["x-youtube-client-version"] = "2.20180719"
|
request.headers["x-youtube-client-version"] ||= "1.20180719"
|
||||||
request.headers["user-agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"
|
request.headers["user-agent"] ||= "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"
|
||||||
end
|
end
|
||||||
|
|
||||||
super
|
super
|
||||||
|
|
Loading…
Reference in a new issue