diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/CookieTempDataProvider.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/CookieTempDataProvider.cs index c3f21802c9..41a15033ab 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/CookieTempDataProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewFeatures/CookieTempDataProvider.cs @@ -65,6 +65,7 @@ public void SaveTempData(HttpContext context, IDictionary values { Domain = string.IsNullOrEmpty(_options.Domain) ? null : _options.Domain, HttpOnly = true, + SameSite = SameSiteMode.Strict, Secure = context.Request.IsHttps, }; SetCookiePath(context, cookieOptions);