mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Abbreviate the stats by removing unneeded and redundant elements. Human readability is overrated. Also add a (hardcoded) password.
This commit is contained in:
@@ -253,7 +253,7 @@ namespace OpenSim.Framework.Monitoring
|
||||
if (!(String.IsNullOrEmpty(pStatName) || pStatName == AllSubCommand || pStatName == statName))
|
||||
continue;
|
||||
|
||||
statMap.Add(statName, theStats[statName].ToOSDMap());
|
||||
statMap.Add(statName, theStats[statName].ToBriefOSDMap());
|
||||
}
|
||||
|
||||
contMap.Add(contName, statMap);
|
||||
@@ -275,6 +275,17 @@ namespace OpenSim.Framework.Monitoring
|
||||
string pContainerName = StatsManager.AllSubCommand;
|
||||
string pStatName = StatsManager.AllSubCommand;
|
||||
|
||||
if (!request.ContainsKey("pass") || request["pass"].ToString() != "l0st4nge1s")
|
||||
{
|
||||
responsedata["int_response_code"] = response_code;
|
||||
responsedata["content_type"] = "text/plain";
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = "Access denied";
|
||||
responsedata["access_control_allow_origin"] = "*";
|
||||
|
||||
return responsedata;
|
||||
}
|
||||
|
||||
if (request.ContainsKey("cat")) pCategoryName = request["cat"].ToString();
|
||||
if (request.ContainsKey("cont")) pContainerName = request["cat"].ToString();
|
||||
if (request.ContainsKey("stat")) pStatName = request["cat"].ToString();
|
||||
@@ -524,4 +535,4 @@ namespace OpenSim.Framework.Monitoring
|
||||
Debug,
|
||||
Info
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user