CookieAuthenticationOptions.CookieSecure 属性

定义

注意

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

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

确定 Cookie 是否只应根据 HTTPS 请求传输。 默认值是当正在执行登录的页面也是 HTTPS 时将 Cookie 限制为 HTTPS 请求。 如果你有 HTTPS 登录页并且你的部分站点是 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

属性值

属性

适用于