aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index d6a18f7..613d7c8 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -203,7 +203,8 @@ const apiKeyCounter = new Gauge({
})
app.get('/metrics', async (req, res) => {
- console.log(req.params, req.headers)
+ if (!req.headers.host?.startsWith('0.0.0.0:'))
+ return res.status(403).send('Forbidden')
try {
res.set('Content-Type', register.contentType)
res.end(await register.metrics())