This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/lib/discourse_cookie_store.rb

17 lines
366 B
Ruby

class ActionDispatch::Session::DiscourseCookieStore < ActionDispatch::Session::CookieStore
def initialize(app, options={})
super(app,options)
end
private
def set_cookie(request, session_id, cookie)
if Hash === cookie
if SiteSetting.force_https
cookie[:secure] = true
end
end
cookie_jar(request)[@key] = cookie
end
end