mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-25 23:17:23 +00:00
Vary user-agent
This commit is contained in:
parent
6930570fa2
commit
e05a25d701
@ -95,7 +95,10 @@ class HTTPClient < HTTP::Client
|
|||||||
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"] ||= "1.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"] ||= random_user_agent
|
||||||
|
request.headers["accept-charset"] ||= "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
|
||||||
|
request.headers["accept"] ||= "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
||||||
|
request.headers["accept-language"] ||= "en-us,en;q=0.5"
|
||||||
end
|
end
|
||||||
|
|
||||||
super
|
super
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user