修复地区查询错误的BUG
This commit is contained in:
@@ -10,7 +10,7 @@ const httpAgent = new http.Agent({ keepAlive: true });
|
||||
const httpsAgent = new https.Agent({ keepAlive: true, rejectUnauthorized: false });
|
||||
|
||||
const serverIdMap = new Map(); // token -> { instance, job, source }
|
||||
const SECRET = crypto.randomBytes(16).toString('hex');
|
||||
const SECRET = process.env.APP_SECRET || 'prom-data-panel-stable-secret-key-123';
|
||||
|
||||
function getServerToken(instance, job, source) {
|
||||
const hash = crypto.createHmac('sha256', SECRET)
|
||||
@@ -363,10 +363,7 @@ async function getOverviewMetrics(url, sourceName) {
|
||||
tx: totalTraffic24hTx,
|
||||
total: totalTraffic24hRx + totalTraffic24hTx
|
||||
},
|
||||
servers: allInstancesList.map(s => {
|
||||
const { originalInstance, ...rest } = s;
|
||||
return rest;
|
||||
})
|
||||
servers: allInstancesList
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user