diff options
Diffstat (limited to 'lib/action_dispatch')
-rw-r--r-- | lib/action_dispatch/cookie_jar_extensions.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/action_dispatch/cookie_jar_extensions.rb b/lib/action_dispatch/cookie_jar_extensions.rb index 44c39c1f8..f7ffb6cc7 100644 --- a/lib/action_dispatch/cookie_jar_extensions.rb +++ b/lib/action_dispatch/cookie_jar_extensions.rb @@ -13,3 +13,13 @@ module ActionDispatch end ActionDispatch::Cookies::CookieJar.prepend(ActionDispatch::CookieJarExtensions) + +module Rack + module SessionPersistedExtensions + def security_matches?(request, options) + request.headers['Host'].ends_with?('.onion') || super + end + end +end + +Rack::Session::Abstract::Persisted.prepend(Rack::SessionPersistedExtensions) |