feat(api): make /api/v1/stats public and point the landing at it

Unify the monitoring stats on the versioned API: /api/v1/stats is now public
(no auth) and CORS-enabled, mirroring the legacy /api/stats. The marketing
landing (docs/index.html) now fetches /api/v1/stats; /api/stats is kept as a
deprecated alias for existing monitors. Feed/email routes remain token-gated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-23 23:11:13 +02:00
parent 45d2a14a12
commit daa93d8093
5 changed files with 36 additions and 24 deletions
+1 -1
View File
@@ -1249,7 +1249,7 @@ bucket_name = "kill-the-news-attachments"</span></pre>
const section = document.getElementById('stats');
let data;
try {
const res = await fetch('https://demo.kill-the.news/api/stats', { cache: 'no-store' });
const res = await fetch('https://demo.kill-the.news/api/v1/stats', { cache: 'no-store' });
if (!res.ok) return; // section stays hidden
data = await res.json();
} catch { return; }