I have an .net core 2.2 project and I get this warning on google chrome:
A cookie associated with a resource at http://doubleclick.net/ was set with SameSite=None
but without Secure
. A future release of Chrome will only deliver cookies marked SameSite=None
if they are also marked Secure
. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5633521622188032.
I tried to solve this by adding headers in Startup.cs (but it not work)
app.Use(async (ctx, next) =>
{
ctx.Response.Headers.Add("Set-Cookie", "HttpOnly;Secure;SameSite=Strict");
});
Checking the Whois records, we can see that doubleclick.net is owned by Google: http://whois.domaintools.com/doubleclick.net. You have Google ads on your page I guess?
There is nothing you can do to remove the warning, it is Google's job to fix their cookie settings on the cookies they serve.