fixes #2620: Users who logged in securely should always be redirected to the HTTPS version of Danbooru
This commit is contained in:
@@ -28,6 +28,14 @@ class SessionCreator
|
||||
}
|
||||
end
|
||||
|
||||
if secure
|
||||
cookies.permanent[:ssl_login] = {
|
||||
:value => "1",
|
||||
:secure => true,
|
||||
:httponly => true
|
||||
}
|
||||
end
|
||||
|
||||
session[:user_id] = user.id
|
||||
user.update_column(:last_ip_addr, ip_addr)
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user