mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add new YT consent cookie to every request
This commit is contained in:
parent
2c1cf42994
commit
739f610507
1 changed files with 1 additions and 0 deletions
|
@ -9,6 +9,7 @@ def add_yt_headers(request)
|
|||
return if request.resource.starts_with? "/sorry/index"
|
||||
request.headers["x-youtube-client-name"] ||= "1"
|
||||
request.headers["x-youtube-client-version"] ||= "2.20200609"
|
||||
request.headers["cookie"] = "CONSENT=YES+cb.20210328-17-p0.en; " # New YT consent cookie for EU servers
|
||||
if !CONFIG.cookies.empty?
|
||||
request.headers["cookie"] = "#{(CONFIG.cookies.map { |c| "#{c.name}=#{c.value}" }).join("; ")}; #{request.headers["cookie"]?}"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue