Fix gateway.token path: write to gateway.auth.token (correct location), not gateway.token

This commit is contained in:
2026-04-12 11:40:34 +00:00
parent 0d8a2994ec
commit 428da5c8c3

View File

@@ -35,9 +35,10 @@ spec:
const fs = require('fs');
const d = JSON.parse(fs.readFileSync(process.env.HOME + '/.openclaw/openclaw.json', 'utf8'));
// Gateway token — must be in openclaw.json for channel auth to work
// Gateway token — must be in gateway.auth.token for channel auth to work
if (!d.gateway) d.gateway = {};
if (!d.gateway.token) d.gateway.token = process.env.OPENCLAW_GATEWAY_TOKEN;
if (!d.gateway.auth) d.gateway.auth = {};
if (!d.gateway.auth.token) d.gateway.auth.token = process.env.OPENCLAW_GATEWAY_TOKEN;
// Hooks token
if (!d.hooks) d.hooks = {};