mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-12 01:04:40 -05:00
Add CORS header for /videoplayback redirect
This commit is contained in:
parent
aa389399bc
commit
9cb96de426
@ -1034,6 +1034,7 @@ get "/videoplayback*" do |env|
|
||||
client.get(url, headers) do |response|
|
||||
if response.headers["Location"]?
|
||||
url = URI.parse(response.headers["Location"])
|
||||
env.response.headers["Access-Control-Allow-Origin"] = "*"
|
||||
env.redirect url.full_path
|
||||
else
|
||||
env.response.status_code = response.status_code
|
||||
|
Loading…
Reference in New Issue
Block a user