123456789101112131415161718 |
- class Session < ActiveRecord::SessionStore::Session
- include Session::SetsPersistentFlag
- def self.secure_flag?
-
- return https? if !Rails.env.production?
- @secure_flag ||= https?
- rescue ActiveRecord::NoDatabaseError, ActiveRecord::StatementInvalid
- false
- end
- def self.https?
- Setting.get('http_type') == 'https'
- end
- end
|