Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/remove header based logger to master v7.9.0 #177

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading