CookiePolicyOptions Class¶
Provides programmatic configuration for the Microsoft.AspNetCore.CookiePolicy.CookiePolicyMiddleware.
- Namespace
Microsoft.AspNetCore.Builder- Assemblies
- Microsoft.AspNetCore.CookiePolicy
Properties¶
-
Microsoft.AspNetCore.Builder.CookiePolicyOptions.HttpOnly¶ Affects whether cookies must be HttpOnly.
Return type: Microsoft.AspNetCore.CookiePolicy.HttpOnlyPolicy public HttpOnlyPolicy HttpOnly { get; set; }
-
Microsoft.AspNetCore.Builder.CookiePolicyOptions.OnAppendCookie¶ Called when a cookie is appended.
Return type: System.Action<Microsoft.AspNetCore.CookiePolicy.AppendCookieContext> public Action<AppendCookieContext> OnAppendCookie { get; set; }
-
Microsoft.AspNetCore.Builder.CookiePolicyOptions.OnDeleteCookie¶ Called when a cookie is deleted.
Return type: System.Action<Microsoft.AspNetCore.CookiePolicy.DeleteCookieContext> public Action<DeleteCookieContext> OnDeleteCookie { get; set; }
-
Microsoft.AspNetCore.Builder.CookiePolicyOptions.Secure¶ Affects whether cookies must be Secure.
Return type: Microsoft.AspNetCore.Http.CookieSecurePolicy public CookieSecurePolicy Secure { get; set; }
-