Redirect after login to allow refresh without browser prompt
This commit is contained in:
parent
bf530217f3
commit
327c4b755f
@ -61,7 +61,8 @@ if cgi.request_method == "POST" && !authenticated
|
|||||||
if check_credentials(username, password)
|
if check_credentials(username, password)
|
||||||
token = create_session
|
token = create_session
|
||||||
cookie = CGI::Cookie.new("name" => "MALP", "value" => token, "path" => "/")
|
cookie = CGI::Cookie.new("name" => "MALP", "value" => token, "path" => "/")
|
||||||
authenticated = true
|
print cgi.header("Status" => "303 See Other", "Location" => ENV["REQUEST_URI"], "cookie" => cookie)
|
||||||
|
exit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user