mirror of
https://github.com/iv-org/invidious.git
synced 2026-09-26 11:35:27 -05:00
strictly match only youtube.com and ytimg.com subdomains
This commit is contained in:
parent
ba19fffa8f
commit
a2f16f5859
@ -133,8 +133,8 @@ def make_client(url : URI, region = nil, force_resolve : Bool = false, force_you
|
|||||||
|
|
||||||
# ytimg.com does not contain any cookies, so we skip the youtube cookies
|
# ytimg.com does not contain any cookies, so we skip the youtube cookies
|
||||||
# for that domain and subdomains (i9.ytimg.com, i.ytimg.com, etc)
|
# for that domain and subdomains (i9.ytimg.com, i.ytimg.com, etc)
|
||||||
yt = url.host.try &.ends_with?("youtube.com")
|
yt = url.host.try { |host| host == "youtube.com" || host.ends_with?(".youtube.com") }
|
||||||
ytimg = url.host.try &.ends_with?("ytimg.com")
|
ytimg = url.host.try { |host| host == "ytimg.com" || host.ends_with?(".ytimg.com") }
|
||||||
youtube_domain = yt || ytimg
|
youtube_domain = yt || ytimg
|
||||||
|
|
||||||
client.before_request do |r|
|
client.before_request do |r|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user