Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(config): say a production boot refuses a placeholder METRICS_TOKEN

Yudhi Armyndharisa0dbff580a0d
diff --git a/.env.example b/.env.example
index 943b6df55..2fbcc2b83 100644
--- a/.env.example
+++ b/.env.example
@@ -313,6 +313,7 @@ OPENWA_PIDS_LIMIT=2048
# Observability — Prometheus scrape endpoint at GET /api/metrics.
# Disabled by default; set a token to enable. Scrapers must send `Authorization: Bearer <token>`.
+# Production refuses to start if it is the placeholder below or another known weak value.
# METRICS_TOKEN=change-me-to-a-long-random-string
# Audit-log retention. Logs older than this many days are pruned daily (and once at startup).
diff --git a/docs/10-devops-infrastructure.md b/docs/10-devops-infrastructure.md
index dc8874c83..c1007b98b 100644
--- a/docs/10-devops-infrastructure.md
+++ b/docs/10-devops-infrastructure.md
@@ -935,7 +935,9 @@ set, scrapers must send `Authorization: Bearer <token>` (compared with `timingSa
wrong token returns 401. After 10 failed attempts from one client IP within a minute, that client is
answered 429 (even with the correct token) until the window slides; a successful scrape does not count
against the limit. The token is **separate** from the API key — the route is `@Public()` (skips
-the API-key guard) and `@SkipThrottle()`.
+the API-key guard) and `@SkipThrottle()`. A production boot refuses a `METRICS_TOKEN` that is the
+`.env.example` placeholder or a known weak value such as `test` or `change-me`, because the route is
+public; there is no length floor, so choose a long random value or leave it unset.
```typescript
// metrics/metrics.service.ts (dependency-free; emits text v0.0.4 by hand)