Skip to content

Commit

Permalink
Warn on dropping sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
jdelStrother committed Mar 7, 2023
1 parent c0ee2c3 commit 166295e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rack-protection/lib/rack/protection/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ def session(env)
end

def drop_session(env)
session(env).clear if session? env
return unless session? env

warn env, "session dropped by #{self.class}"
session(env).clear
end

def referrer(env)
Expand Down

0 comments on commit 166295e

Please sign in to comment.