Using aspnetcore.session 1.1 I am setting the cookie as secure:
services.AddSession(options =>
{
options.CookieSecure = CookieSecurePolicy.Always;
});
yet the cookie is not marked as secure:

What am I missing?
Asof aspnetcore 2
options.CookieSecure = CookieSecurePolicy.Always; is obsolete you need you need to use
services.AddSession(options =>
{
options.Cookie.SecurePolicy = CookieSecurePolicy.Always;
});
Clearing the prior cookie solved issue. Code worked as expected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With