From a460fdc98251aa53f3d6178babaa5cd8a7a4fe41 Mon Sep 17 00:00:00 2001 From: Akshay Shekhawat Date: Wed, 16 Nov 2022 14:58:03 -0800 Subject: [PATCH] update node agent - fastify (#115) --- ingestors/node/package.json | 2 +- ingestors/node/src/modules/fastify.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ingestors/node/package.json b/ingestors/node/package.json index e084e8b1..4afb7892 100644 --- a/ingestors/node/package.json +++ b/ingestors/node/package.json @@ -1,6 +1,6 @@ { "name": "metlo", - "version": "0.0.11", + "version": "0.0.12", "license": "MIT", "description": "The node agent for Metlo API Security.", "main": "dist/index.js", diff --git a/ingestors/node/src/modules/fastify.js b/ingestors/node/src/modules/fastify.js index 051abcc0..63239b86 100644 --- a/ingestors/node/src/modules/fastify.js +++ b/ingestors/node/src/modules/fastify.js @@ -23,7 +23,7 @@ function initialize({ key, host, pool }) { request: { url: { host: request.raw.socket.remoteAddress, - path: request.routerPath, + path: request.url.split("?")[0], parameters: Object.entries(request.query).map(([k, v]) => ({ name: k, value: v })), }, headers: Object.entries(request.headers).map(([k, v]) => ({ name: k, value: v })),