Reputation: 177
Visual Studio 2017 tells me that using options.CookieHttpOnly is obsolete when dealing with a session. What shall I use instead? Here is the code part:
services.AddSession(options =>
{
options.IdleTimeout =
TimeSpan.FromMinutes(20);
#pragma warning disable CS0618 // Type or member is obsolete
options.CookieHttpOnly = true;
#pragma warning restore CS0618 // Type or member is obsolete
});
Upvotes: 0
Views: 63
Reputation: 239240
The option hasn't been removed; it's simply been moved. It's now options.Cookie.HttpOnly
.
Upvotes: 2