diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-15 21:01:35 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-15 21:01:35 -0500 |
| commit | 9cb96de4262ea62cbc851504219c48e4b6e31247 (patch) | |
| tree | 041b003a9e58f9150b011f26695d56af2ea35bd6 | |
| parent | aa389399bc0de162611ef09c6a1e78c5adc5648f (diff) | |
| download | invidious-9cb96de4262ea62cbc851504219c48e4b6e31247.tar.gz invidious-9cb96de4262ea62cbc851504219c48e4b6e31247.tar.bz2 invidious-9cb96de4262ea62cbc851504219c48e4b6e31247.zip | |
Add CORS header for /videoplayback redirect
| -rw-r--r-- | src/invidious.cr | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 8805a789..766dacce 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -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 |
