summaryrefslogtreecommitdiffstats
path: root/src/invidious.cr
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2019-06-08 11:13:00 -0500
committerOmar Roth <omarroth@protonmail.com>2019-06-08 11:13:00 -0500
commit1c9085556c2fdf5c645011b740ab9d614254585d (patch)
treea98748f12e6c9bcbe756e280672588477c4291a1 /src/invidious.cr
parent9122f8acee758794f168989c9da5234bd4c6e688 (diff)
downloadinvidious-1c9085556c2fdf5c645011b740ab9d614254585d.tar.gz
invidious-1c9085556c2fdf5c645011b740ab9d614254585d.tar.bz2
invidious-1c9085556c2fdf5c645011b740ab9d614254585d.zip
Add support for 'attribution_link'
Diffstat (limited to '')
-rw-r--r--src/invidious.cr10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 2ea2c518..80ae4395 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|