lundi 5 avril 2021

Flask, cookie overwrites previous cookeie

I have faced a strange problem. After deploying my website I faced the following, call to flask's set_cookie overwrites the previous cookie and the response header has only one (the last one) cookie set.

resp = make_response({'message': 'OK'}, 200)

resp.set_cookie(key='cookie-id',  value='some cookie value', 
                domain=DOMAIN, max_age=COOKEY_AGE) 

resp.set_cookie(key='cookie-key', value='some cookie key', 
                domain=DOMAIN, max_age=COOKEY_AGE) 

Please offer me a bit of advice :)




Aucun commentaire:

Enregistrer un commentaire