private void CheckSameSite(HttpContext httpContext, CookieOptions options) { if (options.SameSite == SameSiteMode.None) { var userAgent = httpContext.Request.Headers["User-Agent"].ToString(); if (MyUserAgentDetectionLib.DisallowsSameSiteNone(userAgent)) { options.SameSite = (SameSiteMode)(-1); } } }
private void CheckSameSite(HttpContext httpContext, CookieOptions options) { if (options.SameSite == SameSiteMode.None) { var userAgent = httpContext.Request.Headers["User-Agent"].ToString(); #region snippet2 if (MyUserAgentDetectionLib.DisallowsSameSiteNone(userAgent)) { options.SameSite = SameSiteMode.Unspecified; } #endregion } }