修复安全边界问题
This commit is contained in:
@@ -7,10 +7,10 @@ const QUERY_TIMEOUT = 10000;
|
||||
// Reusable agents to handle potential redirect issues and protocol mismatches
|
||||
const crypto = require('crypto');
|
||||
const httpAgent = new http.Agent({ keepAlive: true });
|
||||
const httpsAgent = new https.Agent({ keepAlive: true, rejectUnauthorized: false });
|
||||
const httpsAgent = new https.Agent({ keepAlive: true });
|
||||
|
||||
const serverIdMap = new Map(); // token -> { instance, job, source }
|
||||
const SECRET = process.env.APP_SECRET || 'prom-data-panel-stable-secret-key-123';
|
||||
const SECRET = process.env.APP_SECRET || crypto.randomBytes(32).toString('hex');
|
||||
|
||||
function getServerToken(instance, job, source) {
|
||||
const hash = crypto.createHmac('sha256', SECRET)
|
||||
|
||||
Reference in New Issue
Block a user