Cookies on localhost with explicit domain

前端 未结 21 2124
[愿得一人]
[愿得一人] 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:00

    Another important detail, the expires= should use the following date time format: Wdy, DD-Mon-YYYY HH:MM:SS GMT (RFC6265 - Section 4.1.1).

    Set-Cookie:
      name=value;
      domain=localhost;
      expires=Thu, 16-07-2019 21:25:05 GMT;
      path=/
    

提交回复
热议问题