mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Token auth in researchSync and UPSdisplay
This commit is contained in:
1 parent
a26189947d
commit
20e66cbd40
2 files changed
+2
-2
No files matched your search
@@ -17,7 +17,7 @@ class UPSdisplay {
|
|||||||
let UPS = Math.round(ticksInPeriod / (timePeriod/1000));
|
let UPS = Math.round(ticksInPeriod / (timePeriod/1000));
|
||||||
// console.log("UPS: " + UPS);
|
// console.log("UPS: " + UPS);
|
||||||
try{
|
try{
|
||||||
needle.post(this.config.masterIP+':'+this.config.masterPort+'/api/editSlaveMeta', {instanceID: this.config.unique, password: this.config.clientPassword, meta: {UPS:UPS}}, function(err, resp) {
|
needle.post(this.config.masterIP+':'+this.config.masterPort+'/api/editSlaveMeta', {instanceID: this.config.unique, password: this.config.clientPassword, meta: {UPS:UPS}}, {headers: {'x-access-token': this.config.masterAuthToken}}, function(err, resp) {
|
||||||
// success?
|
// success?
|
||||||
});
|
});
|
||||||
} catch (err){
|
} catch (err){
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class ResearchSync {
|
|||||||
instanceID: this.config.unique,
|
instanceID: this.config.unique,
|
||||||
password: this.config.clientPassword,
|
password: this.config.clientPassword,
|
||||||
meta: {research: this.research}
|
meta: {research: this.research}
|
||||||
}, function (err, resp) {
|
}, {headers: {'x-access-token': this.config.masterAuthToken}}, function (err, resp) {
|
||||||
// success?
|
// success?
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user