Skip to content

Commit

Permalink
Merge pull request #177 from PerimeterX/fix/remove-header-based-logger
Browse files Browse the repository at this point in the history
Fix/remove header based logger to master v7.9.0
  • Loading branch information
chen-zimmer-px authored Jan 17, 2024
2 parents a9b81ab + 6f780db commit 9d41d82
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions lib/pxenforcer.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,8 @@ class PerimeterXEnforcer {
function pxMiddleware(req, res, next) {
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);
Expand All @@ -102,8 +96,6 @@ class PerimeterXEnforcer {
}
});

enforcer.sendHeaderBasedLogs(pxContext, enforcer.config.conf, req);

next();
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9d41d82

Please sign in to comment.