From 84aef70803540c1f9aeefb192e83ddb59fdf3e70 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 17 Apr 2018 15:58:00 -0500 Subject: [PATCH] Set referer if referer is /login --- src/invidious.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index eb764d3c..849fd989 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -413,6 +413,10 @@ get "/login" do |env| referer = env.request.headers["referer"]? referer ||= "/feed/subscriptions" + if referer.ends_with? "/login" + referer = "/feed/subscriptions" + end + templated "login" end