From f67afac71c058d7535718476e652fe52c2cbc312 Mon Sep 17 00:00:00 2001 From: chen-zimmer-px Date: Wed, 17 Jan 2024 14:35:38 +0200 Subject: [PATCH 1/2] removed te header based logger --- CHANGELOG.md | 1 - lib/pxenforcer.js | 7 ------- 2 files changed, 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25529dd..edd42ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added -- Support for header-based logger - Added `risk_start_time` and `enforcer_start_time` fields to enforcer activities. - Added `failOnEmptyBody` flag for `callServer` to specify weather or not a request should fail if it has no body. - Updated the configuration of PX first-party requests to include a connection timeout diff --git a/lib/pxenforcer.js b/lib/pxenforcer.js index 9746985..2914150 100644 --- a/lib/pxenforcer.js +++ b/lib/pxenforcer.js @@ -80,13 +80,8 @@ class PerimeterXEnforcer { parseCookies(req, res).then(() => { enforcer.enforce(req, res, (err, response) => { let pxContext = null; - if (req.locals && req.locals.pxCtx) { - pxContext = req.locals.pxCtx; - } if (!err && response) { PerimeterXEnforcer.handleCallbackResponse(err, response, res); - - enforcer.sendHeaderBasedLogs(pxContext, enforcer.config.conf, req); } else { //pass saveResponseBody(res); @@ -102,8 +97,6 @@ class PerimeterXEnforcer { } }); - enforcer.sendHeaderBasedLogs(pxContext, enforcer.config.conf, req); - next(); } From 6f780db92250d2392d1fef10fd6acab2719d2d00 Mon Sep 17 00:00:00 2001 From: chen-zimmer-px Date: Wed, 17 Jan 2024 23:32:32 +0200 Subject: [PATCH 2/2] update node core version --- lib/pxenforcer.js | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/pxenforcer.js b/lib/pxenforcer.js index 2914150..bd1c1a2 100644 --- a/lib/pxenforcer.js +++ b/lib/pxenforcer.js @@ -79,7 +79,6 @@ class PerimeterXEnforcer { function pxMiddleware(req, res, next) { parseCookies(req, res).then(() => { enforcer.enforce(req, res, (err, response) => { - let pxContext = null; if (!err && response) { PerimeterXEnforcer.handleCallbackResponse(err, response, res); } else { diff --git a/package.json b/package.json index 036bdeb..fe6169e 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "axios": "^0.21.1", "cookie-parser": "^1.4.1", - "perimeterx-node-core": "^3.13.0" + "perimeterx-node-core": "3.15.1" }, "devDependencies": { "chai": "^4.3.6",