mirror of
https://github.com/hkalexling/Mango.git
synced 2026-03-20 00:00:48 -04:00
Respect base url setting when redirecting
This commit is contained in:
@@ -11,7 +11,7 @@ class AuthHandler < Kemal::Handler
|
||||
|
||||
cookie = env.request.cookies.find { |c| c.name == "token" }
|
||||
if cookie.nil? || !@storage.verify_token cookie.value
|
||||
return env.redirect "/login"
|
||||
return redirect env, "/login"
|
||||
end
|
||||
|
||||
if request_path_startswith env, ["/admin", "/api/admin", "/download"]
|
||||
|
||||
Reference in New Issue
Block a user