id.rb 532 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rack/session/abstract/id'
  3. module Rack
  4. module Session
  5. module Abstract
  6. class Persisted
  7. alias original_security_matches? security_matches?
  8. # https://github.com/rack/rack/blob/2.2.3/lib/rack/session/abstract/id.rb#L363-L366
  9. def security_matches?(request, options)
  10. options[:secure] = ::Session.secure_flag?
  11. original_security_matches?(request, options)
  12. end
  13. end
  14. end
  15. end
  16. end