From 1c9085556c2fdf5c645011b740ab9d614254585d Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 8 Jun 2019 11:13:00 -0500 Subject: [PATCH] Add support for 'attribution_link' --- src/invidious.cr | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index 2ea2c5180..80ae4395f 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2783,6 +2783,16 @@ get "/profile" do |env| end end +get "/attribution_link" do |env| + if query = env.params.query["u"]? + url = URI.parse(query).full_path + else + url = "/" + end + + env.redirect url +end + # Page used by YouTube to provide captioning widget, since we # don't support it we redirect to '/' get "/timedtext_video" do |env|