Settings hashing fix
gitea/docker-discover/pipeline/head This commit looks good
Details
gitea/docker-discover/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ba1cbd431d
commit
c84fafb975
5
index.js
5
index.js
|
@ -64,10 +64,12 @@ async function updateProxy() {
|
|||
}
|
||||
services = services.sort(sortFn);
|
||||
|
||||
let configString = template({services, nodes, info});
|
||||
|
||||
// Cheking settings hash
|
||||
|
||||
let infoHash = shajs('sha256')
|
||||
.update(JSON.stringify({services, nodes}))
|
||||
.update(configString)
|
||||
.digest('hex');
|
||||
console.log('Settings hash:', infoHash);
|
||||
|
||||
|
@ -79,7 +81,6 @@ async function updateProxy() {
|
|||
// Creating configuration file
|
||||
|
||||
let tmpConf = `${tmpDir}/config.cfg`;
|
||||
let configString = template({services, nodes, info});
|
||||
fs.writeFileSync(tmpConf, configString);
|
||||
|
||||
if (conf.debug) {
|
||||
|
|
Reference in New Issue