The “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect.

Dondon510 221 Reputation points
2022-10-04T12:11:25.277+00:00

Hi,

I need advice, I got the below warning but I don't understand what should I do

Cookie “__RequestVerificationToken” with the “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect.

I thought it's related to my cookie policy below:

builder.Services.Configure<CookiePolicyOptions>(options =>  
{  
    // This lambda determines whether user consent for non-essential cookies is needed for a given request.    
    options.CheckConsentNeeded = context => true;  
    options.MinimumSameSitePolicy = SameSiteMode.None;  
});  

any body can help me how to deal with this?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,234 questions
{count} votes