mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Fix infinite redirect for 'subscription_ajax'
This commit is contained in:
parent
4d034bedce
commit
d2d5de55c1
1 changed files with 4 additions and 1 deletions
|
@ -1051,7 +1051,10 @@ end
|
|||
get "/subscription_ajax" do |env|
|
||||
user = env.get? "user"
|
||||
referer = env.request.headers["referer"]?
|
||||
referer ||= "/"
|
||||
|
||||
if !referer || URI.parse(referer).path.try &.== "/subscription_ajax"
|
||||
referer = "/"
|
||||
end
|
||||
|
||||
if user
|
||||
user = user.as(User)
|
||||
|
|
Loading…
Reference in a new issue