共用方式為


CookieAuthenticationOptions.CookieSecure 屬性

定義

警告

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

此屬性已過時,未來版本將會移除。 建議的替代方案是在 上 Cookie

判斷是否 cookie 僅應該在 HTTPS 要求中傳輸。 若進行登入的頁面也為 HTTP,則預設為限制 HTTPS 要求的 cookie。 若您有 HTTP 登入頁面,且您的部份網站為 HTTP,您可能需要變更此值。

public:
 property Microsoft::AspNetCore::Http::CookieSecurePolicy CookieSecure { Microsoft::AspNetCore::Http::CookieSecurePolicy get(); void set(Microsoft::AspNetCore::Http::CookieSecurePolicy value); };
[System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is Cookie.SecurePolicy.")]
public Microsoft.AspNetCore.Http.CookieSecurePolicy CookieSecure { get; set; }
[<System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is Cookie.SecurePolicy.")>]
member this.CookieSecure : Microsoft.AspNetCore.Http.CookieSecurePolicy with get, set
Public Property CookieSecure As CookieSecurePolicy

屬性值

屬性

適用於