class Rack::Protection::EncryptedCookie
def write_session(req, session_id, session, _options)
def write_session(req, session_id, session, _options) session = session.merge('session_id' => session_id) session_data = coder.encode(session) unless @secrets.empty? session_data = Rack::Protection::Encryptor.encrypt_message(session_data, @secrets.first) end if session_data.size > (4096 - @key.size) req.get_header(RACK_ERRORS).puts('Warning! Rack::Protection::EncryptedCookie data size exceeds 4K.') nil else session_data end end