Fixed race condition: AJAX data fetch requests re-set sessions that should get deleted by logout request.
This commit is contained in:
parent
967105b97f
commit
295844c72e
1 changed files with 2 additions and 1 deletions
|
@ -114,12 +114,13 @@ class SessionsController < ApplicationController
|
|||
# "Delete" a login, aka "log the user out"
|
||||
def destroy
|
||||
|
||||
reset_session
|
||||
|
||||
# Remove the user id from the session
|
||||
@_current_user = nil
|
||||
|
||||
# reset session
|
||||
request.env['rack.session.options'][:expire_after] = nil
|
||||
session.clear
|
||||
|
||||
render json: {}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue