CookieAuthenticationOptions.CookieHttpOnly 属性

定义

注意

This property is obsolete and will be removed in a future version. The recommended alternative is Cookie.SameSite.

注意

This property is obsolete and will be removed in a future version. The recommended alternative is Cookie.HttpOnly.

此属性已过时,将在将来的版本中删除。 建议的替代项是在 上 Cookie

确定浏览器是否应允许客户端 javascript 访问 Cookie。 默认值为 true,这表示只将 Cookie 传递给 http 请求,而不可供页上的脚本使用。

public:
 property bool CookieHttpOnly { bool get(); void set(bool value); };
[System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is Cookie.SameSite.")]
public bool CookieHttpOnly { get; set; }
[System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is Cookie.HttpOnly.")]
public bool CookieHttpOnly { get; set; }
[<System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is Cookie.SameSite.")>]
member this.CookieHttpOnly : bool with get, set
[<System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is Cookie.HttpOnly.")>]
member this.CookieHttpOnly : bool with get, set
Public Property CookieHttpOnly As Boolean

属性值

属性

适用于