instance method
flag_cookies_as_secure!
Ruby on Rails 5.1.7
Since v4.0.13 Last seen in v5.1.7 Private — implementation detail, not part of the public APISignature
flag_cookies_as_secure!(headers)
No documentation comment.
Parameters
-
headersreq
Source
# File actionpack/lib/action_dispatch/middleware/ssl.rb, line 105
def flag_cookies_as_secure!(headers)
if cookies = headers["Set-Cookie".freeze]
cookies = cookies.split("\n".freeze)
headers["Set-Cookie".freeze] = cookies.map { |cookie|
if cookie !~ /;\s*secure\s*(;|$)/i
"#{cookie}; secure"
else
cookie
end
}.join("\n".freeze)
end
end
Defined in actionpack/lib/action_dispatch/middleware/ssl.rb line 105
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::SSL