Stop sending rcon passwords because security and stuff

This commit is contained in:
Danielv123 committed 2017-01-05 13:19:45 +01:00
1 parent 0f7916229a
commit a49f98b228
1 file changed
+6 -1
+6 -1
View File
@@ -61,7 +61,12 @@ app.post("/getID", function(req,res) {
app.get("/slaves", function(req, res) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
res.send(slaves)
let copyOfSlaves = slaves
// filter out the rcon password because thats kindof not a safe thing to share
for(key in copyOfSlaves) {
copyOfSlaves[key].rconPassword = "hidden";
}
res.send(copyOfSlaves)
});
// endpoint to send items to