Middleware javítás

This commit is contained in:
2025-03-21 09:57:07 +01:00
parent 6dcc4989ac
commit efecf55dd8
3 changed files with 15 additions and 5 deletions
@@ -32,6 +32,13 @@ namespace WorkFlowCheck.Web.Middleware
{
context.Response.Cookies.Delete("AuthToken");
}
var path = context.Request.Path.ToString().ToLower();
if (!path.StartsWith("/account/login") && !path.StartsWith("/account/register"))
{
context.Response.Redirect("/Account/Login");
return;
}
}
await _next(context);
}