Reason to rename ASP.NET Session Cookie Name?

后端 未结 6 1692
抹茶落季
抹茶落季 2021-01-11 15:33

is there any reason (safety?) why someone should rename the ASP.NET Session Cookie Name or is it just a senseless option of ASP.NET?

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-11 15:45

    With cookie prefixes, you can add a security attribute to your cookie by naming it a special way. So in that case renaming your ASP.NET session cookie does have an impact on security:

    • __Secure-… cookies can only be written from secure (HTTPS) sites.
    • __Host-… cookies can only be written from the same, secure domain. So not from subdomains or insecure (HTTP) sites.

提交回复
热议问题