mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
ytdl_hook: add a header to support geo-bypass
youtube-dl supports bypassing some geographic restrictions by setting X-Forwarded-For header when used with geo-bypass and geo-bypass-country.
This commit is contained in:
parent
572802e866
commit
46bfa3726f
@ -41,7 +41,7 @@ local function set_http_headers(http_headers)
|
||||
if useragent and not option_was_set("user-agent") then
|
||||
mp.set_property("file-local-options/user-agent", useragent)
|
||||
end
|
||||
local additional_fields = {"Cookie", "Referer"}
|
||||
local additional_fields = {"Cookie", "Referer", "X-Forwarded-For"}
|
||||
for idx, item in pairs(additional_fields) do
|
||||
local field_value = http_headers[item]
|
||||
if field_value then
|
||||
|
Loading…
Reference in New Issue
Block a user