mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(resilience): relax ranking cache gate, reuse WORLDMONITOR_VALID_KEYS (#3045)
This commit is contained in:
@@ -11,7 +11,11 @@ import {
|
||||
loadEnvFile(import.meta.url);
|
||||
|
||||
const API_BASE = process.env.API_BASE_URL || 'https://api.worldmonitor.app';
|
||||
const WM_KEY = process.env.WORLDMONITOR_API_KEY || '';
|
||||
// Reuse WORLDMONITOR_VALID_KEYS when a dedicated WORLDMONITOR_API_KEY isn't set.
|
||||
// See seed-resilience-scores.mjs for the rationale.
|
||||
const WM_KEY = process.env.WORLDMONITOR_API_KEY
|
||||
|| (process.env.WORLDMONITOR_VALID_KEYS ?? '').split(',').map((k) => k.trim()).filter(Boolean)[0]
|
||||
|| '';
|
||||
const SEED_UA = 'Mozilla/5.0 (compatible; WorldMonitor-Seed/1.0)';
|
||||
|
||||
const INTERVAL_KEY_PREFIX = 'resilience:intervals:v1:';
|
||||
|
||||
Reference in New Issue
Block a user