mirror of
https://github.com/hkalexling/Mango.git
synced 2026-03-20 00:00:48 -04:00
Clean up
This commit is contained in:
@@ -15,7 +15,6 @@ class AuthHandler < Kemal::Handler
|
||||
end
|
||||
|
||||
def require_basic_auth(env)
|
||||
headers = HTTP::Headers.new
|
||||
env.response.status_code = 401
|
||||
env.response.headers["WWW-Authenticate"] = HEADER_LOGIN_REQUIRED
|
||||
env.response.print AUTH_MESSAGE
|
||||
@@ -59,9 +58,8 @@ class AuthHandler < Kemal::Handler
|
||||
|
||||
def handle_opds_auth(env)
|
||||
if validate_cookie_token(env) || validate_auth_header(env)
|
||||
return call_next env
|
||||
call_next env
|
||||
else
|
||||
headers = HTTP::Headers.new
|
||||
env.response.status_code = 401
|
||||
env.response.headers["WWW-Authenticate"] = HEADER_LOGIN_REQUIRED
|
||||
env.response.print AUTH_MESSAGE
|
||||
|
||||
Reference in New Issue
Block a user