mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 15:43:13 +09:00
Merge masterIP and masterPort into masterURL
Merge the masterIP and masterPort configuration entries into a single masterURL entry. Fixes the problem with connecting to an HTTPS version of the master server and also makes it easier to host the master server behind a reverse proxy. This breaks all known code interfacing Clusterio.
This commit is contained in:
1 parent
da99b39402
commit
98900e72dc
15 files changed
+68
-43
No files matched your search
@@ -25,9 +25,14 @@ class UPSdisplay {
|
||||
let UPS = Math.round(ticksInPeriod / (timePeriod/1000));
|
||||
// console.log("UPS: " + UPS);
|
||||
try{
|
||||
needle.post(this.config.masterIP+':'+this.config.masterPort+'/api/editSlaveMeta', {instanceID: this.config.unique, password: this.config.clientPassword, meta: {UPS:UPS, tick:this.tick}}, {headers: {'x-access-token': this.config.masterAuthToken}}, function(err, resp) {
|
||||
// success?
|
||||
});
|
||||
needle.post(
|
||||
this.config.masterURL+'/api/editSlaveMeta',
|
||||
{instanceID: this.config.unique, password: this.config.clientPassword, meta: {UPS:UPS, tick:this.tick}},
|
||||
{headers: {'x-access-token': this.config.masterAuthToken}},
|
||||
function(err, resp) {
|
||||
// success?
|
||||
}
|
||||
);
|
||||
} catch (err){
|
||||
console.log(err);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user