mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
Stop sending rcon passwords because security and stuff
This commit is contained in:
1 parent
0f7916229a
commit
a49f98b228
1 file changed
+6
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user