12345678910111213141516171819202122 |
- require 'rack/utils'
- module Rack
- module Utils
- module_function
- singleton_class.alias_method :original_add_cookie_to_header, :add_cookie_to_header
-
- def add_cookie_to_header(header, key, value)
- if value.is_a?(Hash)
- value[:secure] = ::Session.secure_flag?
- end
- original_add_cookie_to_header(header, key, value)
- end
- end
- end
|