diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-05 18:15:08 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-05 18:15:08 -0700 |
commit | aad33d5808a8c5fd10732db1045fb3367a4e72f4 (patch) | |
tree | faac539b164ac1acc85d58b281602ff8e8c202df /actionpack/lib/action_dispatch/middleware | |
parent | 78960cf56084e830aabd0f97b17ea0fa86cb6f17 (diff) | |
download | rails-aad33d5808a8c5fd10732db1045fb3367a4e72f4.tar.gz rails-aad33d5808a8c5fd10732db1045fb3367a4e72f4.tar.bz2 rails-aad33d5808a8c5fd10732db1045fb3367a4e72f4.zip |
remove @secure ivar
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/cookies.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index fbcff3cd94..275e16c802 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -260,17 +260,15 @@ module ActionDispatch def self.build(req, cookies) host = req.host - secure = req.ssl? - new(host, secure, req).tap do |hash| + new(host, req).tap do |hash| hash.update(cookies) end end - def initialize(host = nil, secure = false, request) + def initialize(host = nil, request) @set_cookies = {} @delete_cookies = {} @host = host - @secure = secure @request = request @cookies = {} @committed = false @@ -394,7 +392,7 @@ module ActionDispatch private def write_cookie?(cookie) - @secure || !cookie[:secure] || always_write_cookie + @request.ssl? || !cookie[:secure] || always_write_cookie end end |