mirror of https://github.com/Squidex/squidex.git
7 changed files with 65 additions and 4 deletions
@ -0,0 +1,24 @@ |
|||||
|
// ==========================================================================
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
||||
|
// All rights reserved. Licensed under the MIT license.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
using Microsoft.AspNetCore.Mvc.Filters; |
||||
|
|
||||
|
namespace Squidex.Web |
||||
|
{ |
||||
|
public sealed class ClearCookiesAttribute : ActionFilterAttribute |
||||
|
{ |
||||
|
public override void OnActionExecuting(ActionExecutingContext context) |
||||
|
{ |
||||
|
var cookies = context.HttpContext.Response.Cookies; |
||||
|
|
||||
|
foreach (var cookie in context.HttpContext.Request.Cookies.Keys) |
||||
|
{ |
||||
|
cookies.Delete(cookie); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue