relay: the packaged intake key reports too (build job uploads got 'no token' after the key split)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-05 08:24:31 +00:00
parent 37c947beb9
commit 2866737139

View file

@ -39,6 +39,9 @@ export function authed(req) {
if (sameSecret(given, token)) return 'token';
const k = req.headers['x-igneum-key'];
if (sameSecret(k, key)) return 'key';
// the key packaged into every miner app (LOG_INTAKE_KEY, and its successor during a rotation) reports too: the
// build job uploads its binaries with it (5 October 2026: 0.3.5 apps got "no token" after the relay key split)
for (const name of ['LOG_INTAKE_KEY', 'LOG_INTAKE_KEY_NEXT']) if (process.env[name] && sameSecret(k, process.env[name])) return 'key';
return null;
}