mercredi 20 décembre 2017

Sinatra - A part of a cookie is missing

I'm using the framework Sinatra and I created a cookie with two variables: a username and an expire time, as follows:

logged = response.set_cookie(:login, :as => "fabiopavan", :expires => Time.now + 3600)
puts logged

The cookie is shown like this:

logged=; expires=Wed, 20 Dec 2017 17:47:29 -0000

The problem is that the first variable, :as, doesn't appear.




Aucun commentaire:

Enregistrer un commentaire