How to set SameSite cookie attribute to explicit None ASP NET Core

前端 未结 5 1080
無奈伤痛
無奈伤痛 2020-12-10 12:43

Chrome 76 will begin to support an explicit SameSite: None attribute

https://web.dev/samesite-cookies-explained/

I found that the current imple

5条回答
  •  独厮守ぢ
    2020-12-10 13:08

    It's now fixed in latest release of all versions of .NET Framework and .NET Core (https://github.com/aspnet/AspNetCore/issues/12125)

    I have multiple projects running on .NET Core 2.2 and after upgrading to 2.2.207, I don't have the problem anymore.

    Here a sample code present in ConfigureServices method of Startup.cs file

    services.ConfigureApplicationCookie(options => {
         options.Cookie.SameSite = SameSiteMode.None;
    });
    

提交回复
热议问题