mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-11 23:58:08 -05:00
changes and vpn checking
This commit is contained in:
@ -18,7 +18,9 @@ namespace WebfrontCore.Controllers
|
||||
public override void OnActionExecuting(ActionExecutingContext context)
|
||||
{
|
||||
Manager = IW4MAdmin.Program.ServerManager;
|
||||
Authorized = Manager.AdministratorIPs.Contains(context.HttpContext.Connection.RemoteIpAddress.ToString().ConvertToIP());
|
||||
Authorized = context.HttpContext.Connection.RemoteIpAddress.ToString() == "127.0.0.1" ||
|
||||
Manager.AdministratorIPs.Contains(context.HttpContext.Connection.RemoteIpAddress.ToString().ConvertToIP());
|
||||
ViewBag.Authorized = Authorized;
|
||||
base.OnActionExecuting(context);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user