共用方式為


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

判斷瀏器是否應該允許 Cookie 由用戶端 Javascript 存取。 預設為 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

屬性值

屬性

適用於