Skip to content

Commit

Permalink
Update rack-protection/lib/rack/protection/base.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Patrik Ragnarsson <patrik@starkast.net>
  • Loading branch information
jdelStrother and dentarg authored Jul 26, 2023
1 parent a91bd23 commit b1865c3
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 @@ -95,8 +95,11 @@ def session(env)
def drop_session(env)
return unless session? env

warn env, "session dropped by #{self.class}" unless ENV["RACK_PROTECTION_SILENCE_REACTIONS"] == "1"
session(env).clear

return if ["1", "true"].include?(ENV["RACK_PROTECTION_SILENCE_DROP_SESSION_WARNING"])

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

def referrer(env)
Expand Down

0 comments on commit b1865c3

Please sign in to comment.