We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6057846 commit 3e28de8Copy full SHA for 3e28de8
src/plugins/metrics.ts
@@ -5,7 +5,7 @@ import ipaddr from "ipaddr.js";
5
export default fp(async (fastify, opts) => {
6
fastify.addHook("onRequest", async (request, reply) => {
7
// Only check IP on the /metrics endpoint
8
- // Since we don't register this endpoint, we have to make this check.
+ // The /metrics endpoint is registered by fastify-metrics, so we enforce IP restrictions here via the onRequest hook.
9
if (request.url.split("?")[0] === "/metrics") {
10
const ip = request.ip;
11
0 commit comments