chore: comment stress testing code by default

This commit is contained in:
siiky 2025-06-05 16:32:36 +01:00
parent cb046ea726
commit ab0a5a33e5

View file

@ -1,6 +1,6 @@
const crypto = require('crypto') const crypto = require('crypto')
const IS_STRESS_TESTING = process.env.LAMASSU_STRESS_TESTING === 'YES' //const IS_STRESS_TESTING = process.env.LAMASSU_STRESS_TESTING === 'YES'
function sha256(buf) { function sha256(buf) {
if (!buf) return null if (!buf) return null
@ -16,7 +16,7 @@ const populateDeviceId = function (req, res, next) {
: null : null
let deviceId = peerCert?.raw ? sha256(peerCert.raw) : null let deviceId = peerCert?.raw ? sha256(peerCert.raw) : null
if (!deviceId && IS_STRESS_TESTING) deviceId = req.headers.device_id //if (!deviceId && IS_STRESS_TESTING) deviceId = req.headers.device_id
if (!deviceId) if (!deviceId)
return res.status(500).json({ error: 'Unable to find certificate' }) return res.status(500).json({ error: 'Unable to find certificate' })