Flowdock
method

flag_cookies_as_secure!

Importance_0
Ruby on Rails latest stable (v5.2.3) - 0 notes - Class: SSL

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

flag_cookies_as_secure!(headers) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide 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*(;|$)/
              "#{cookie}; secure"
            else
              cookie
            end
          }.join("\n".freeze)
        end
      end
Register or log in to add new notes.