Cookies on localhost with explicit domain

前端 未结 21 1786
[愿得一人]
[愿得一人] 2020-11-22 04:17

I must be missing some basic thing about cookies. On localhost, when I set a cookie on server side and specify the domain explicitly as localhost (or .localhost). t

21条回答
  •  终归单人心
    2020-11-22 05:10

    I had the same issue and I fixed it by putting 2 dots in the cookie name itself without specifying any domain.

    set-cookie: name.s1.s2=value; path=/; expires=Sun, 12 Aug 2018 14:28:43 GMT; HttpOnly
    

提交回复
热议问题