mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-22 21:43:38 +00:00
make_client: add YouTube headers on *.youtube.com
This commit is contained in:
parent
46c58bd84c
commit
6e39b9b303
@ -55,7 +55,7 @@ def make_client(url : URI, region = nil, force_resolve : Bool = false, force_you
|
||||
client.family = Socket::Family::INET if client.family == Socket::Family::UNSPEC
|
||||
end
|
||||
|
||||
client.before_request { |r| add_yt_headers(r) } if url.host == "www.youtube.com" || force_youtube_headers
|
||||
client.before_request { |r| add_yt_headers(r) } if url.host.try &.ends_with?("youtube.com") || force_youtube_headers
|
||||
client.read_timeout = 10.seconds
|
||||
client.connect_timeout = 10.seconds
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user