Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
- {
- {
- string empId = context.RouteData.Values[RouteValues.EmployerAccountId]?.ToString().ToUpper();
- const string StrictCookieKey = "strictCookie";
- const string LaxCookieKey = "laxCookie";
- string strictCookie = context.HttpContext.Request.Cookies[StrictCookieKey]?.ToString();
- string laxCookie = context.HttpContext.Request.Cookies[LaxCookieKey]?.ToString();
- context.HttpContext.Response.Cookies.Append(StrictCookieKey, "XXX", new CookieOptions
- {
- Secure = false,
- SameSite = SameSiteMode.Strict,
- HttpOnly = true
- });
- context.HttpContext.Response.Cookies.Append(LaxCookieKey, "XXX", new CookieOptions
- {
- Secure = false,
- SameSite = SameSiteMode.Lax,
- HttpOnly = true
- });
- context.Result = new RedirectResult(context.HttpContext.Request.Path);
- return;
- }
- // Some unreachable code here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement