Middleware javítás
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user