This commit is contained in:
Pierre
2026-05-24 17:43:45 +02:00
parent b1d8a56c53
commit f77bb71b44
+18 -1
View File
@@ -85,7 +85,24 @@ export class LeaderClient {
return null;
}
this.cachedUrls = await response.json() as URLsResponse;
const parsed = await response.json() as URLsResponse;
// api-mediated-access PR D: redisUrl is no longer published by
// meta-core. If it shows up, an older build snuck back in —
// fail loudly so the rollback can't go unnoticed. Set
// ALLOW_LEGACY_REDIS_URL=1 to downgrade to a warning during a
// deliberate temporary rollback.
if (parsed.redisUrl) {
const msg =
'[LeaderClient] meta-core still publishes redisUrl; ' +
'direct Redis access was retired by the api-mediated-access ' +
'lockdown. Verify meta-core version.';
if (process.env.ALLOW_LEGACY_REDIS_URL === '1') {
console.warn('WARNING: ' + msg);
} else {
throw new Error(msg);
}
}
this.cachedUrls = parsed;
this.urlsCacheTime = now;
return this.cachedUrls;
} catch (error) {