kopia lustrzana https://github.com/iv-org/invidious
Merge pull request #1960 from syeopite/fix1959
Add new YT consent cookie to every requestpull/1967/head
commit
052c5c67b8
|
@ -9,6 +9,7 @@ def add_yt_headers(request)
|
||||||
return if request.resource.starts_with? "/sorry/index"
|
return if request.resource.starts_with? "/sorry/index"
|
||||||
request.headers["x-youtube-client-name"] ||= "1"
|
request.headers["x-youtube-client-name"] ||= "1"
|
||||||
request.headers["x-youtube-client-version"] ||= "2.20200609"
|
request.headers["x-youtube-client-version"] ||= "2.20200609"
|
||||||
|
request.headers["cookie"] = "CONSENT=YES+" # New YT consent cookie for EU servers
|
||||||
if !CONFIG.cookies.empty?
|
if !CONFIG.cookies.empty?
|
||||||
request.headers["cookie"] = "#{(CONFIG.cookies.map { |c| "#{c.name}=#{c.value}" }).join("; ")}; #{request.headers["cookie"]?}"
|
request.headers["cookie"] = "#{(CONFIG.cookies.map { |c| "#{c.name}=#{c.value}" }).join("; ")}; #{request.headers["cookie"]?}"
|
||||||
end
|
end
|
||||||
|
|
Ładowanie…
Reference in New Issue