From 2f6b13cf3194db5149934a3e089f22ae6fa2087d Mon Sep 17 00:00:00 2001 From: SaraLumelsky <37770740+SaraLumelsky@users.noreply.github.com> Date: Sun, 2 Dec 2018 10:59:32 +0200 Subject: [PATCH 1/7] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2d901ed..bba12b1 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Table of Contents ----------------- - [Installation](#installation) - [Basic Usage Example](#basicUsage) +- [Upgrading](#upgrade) - [Advanced Blocking Response](#advancedBlockingResponse) - [Advanced Configuration Options](#configuration) * [Module Enabled](#moduleEnabled) @@ -95,6 +96,9 @@ server.listen(8081, () => { console.log('server started'); }); ``` +## Upgrading + +TBD ## Advanced Blocking Response In special cases, (such as XHR post requests) a full Captcha page render might not be an option. In such cases, using the Advanced Blocking Response returns a JSON object continaing all the information needed to render your own Captcha challenge implementation, be it a popup modal, a section on the page, etc. The Advanced Blocking Response occurs when a request contains the *Accept* header with the value of `application/json`. A sample JSON response appears as follows: From 27d4d6af2ad95db3fe46e4ed55b3ece6e34fda0c Mon Sep 17 00:00:00 2001 From: SaraLumelsky <37770740+SaraLumelsky@users.noreply.github.com> Date: Wed, 26 Dec 2018 11:15:40 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bba12b1..9a6597c 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ server.listen(8081, () => { ``` ## Upgrading -TBD +Contact [PerimeterX Support](support@perimeterx.com) for more details. ## Advanced Blocking Response In special cases, (such as XHR post requests) a full Captcha page render might not be an option. In such cases, using the Advanced Blocking Response returns a JSON object continaing all the information needed to render your own Captcha challenge implementation, be it a popup modal, a section on the page, etc. The Advanced Blocking Response occurs when a request contains the *Accept* header with the value of `application/json`. A sample JSON response appears as follows: From 2479f16a73a5ee3ed89cd35ce319cce25566aa8d Mon Sep 17 00:00:00 2001 From: SaraLumelsky <37770740+SaraLumelsky@users.noreply.github.com> Date: Tue, 15 Jan 2019 11:22:46 +0200 Subject: [PATCH 3/7] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a6597c..b33ecf1 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,11 @@ server.listen(8081, () => { ``` ## Upgrading -Contact [PerimeterX Support](support@perimeterx.com) for more details. +Run: + +`npm install -s perimeterx-node-express` + +For more information,contact [PerimeterX Support](support@perimeterx.com). ## Advanced Blocking Response In special cases, (such as XHR post requests) a full Captcha page render might not be an option. In such cases, using the Advanced Blocking Response returns a JSON object continaing all the information needed to render your own Captcha challenge implementation, be it a popup modal, a section on the page, etc. The Advanced Blocking Response occurs when a request contains the *Accept* header with the value of `application/json`. A sample JSON response appears as follows: From 9ce863db0fee438712b575656c4e099a73ec3b69 Mon Sep 17 00:00:00 2001 From: SaraLumelsky <37770740+SaraLumelsky@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:22:56 +0200 Subject: [PATCH 4/7] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 079712a..18fc920 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,8 @@ Table of Contents * [Sensitive Headers](#sensitiveHeaders) * [IP Headers](#ipHeaders) * [First Party Enabled](#firstPartyEnabled) - * [Custom Request Handler](#customRequestHandler) + + * [Custom Request Handler](#customRequestHandler) * [Additional Activity Handler](#additionalActivityHandler) * [Proxy Support](#proxySupport) - [Advanced Blocking Response](#advancedBlockingResponse) @@ -37,7 +38,11 @@ PerimeterX Express.js middleware is installed via NPM: > Please note: As stated in (NodeJS's release schedule)(#https://github.com/nodejs/Release#release-schedule), NodeJS 6.x is reaching EOL. Thus, support for it will be dropped starting with version 5.0.0. ## Upgrading +To upgrade to the latest Enforcer version, run: +`npm install -s perimeterx-node-express` + +For more information, contact [PerimeterX Support](support@perimeterx.com). ## Configuration ### Required Configuration From dfb8fbdf77cd749791b9c912f85a36d55aada42d Mon Sep 17 00:00:00 2001 From: SaraLumelsky <37770740+SaraLumelsky@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:25:03 +0200 Subject: [PATCH 5/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 18fc920..a6e83a3 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Table of Contents PerimeterX Express.js middleware is installed via NPM: `$ npm install --save perimeterx-node-express` -> Please note: As stated in (NodeJS's release schedule)(#https://github.com/nodejs/Release#release-schedule), NodeJS 6.x is reaching EOL. Thus, support for it will be dropped starting with version 5.0.0. +> Please note: As stated in [NodeJS's release schedule](https://github.com/nodejs/Release#release-schedule), NodeJS 6.x is reaching EOL. Thus, support for it will be dropped starting with version 5.0.0. ## Upgrading To upgrade to the latest Enforcer version, run: From d7f9975f38d4c7af0db52e2d46db6054f137c542 Mon Sep 17 00:00:00 2001 From: SaraLumelsky <37770740+SaraLumelsky@users.noreply.github.com> Date: Mon, 11 Feb 2019 14:02:39 +0200 Subject: [PATCH 6/7] Update README.md (#72) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a6e83a3..f316476 100644 --- a/README.md +++ b/README.md @@ -115,10 +115,12 @@ server.listen(8081, () => { ``` ## Upgrading -Run: +To upgrade to the latest Enforcer version, run: `npm install -s perimeterx-node-express` +Your Enforcer version is now upgraded to the latest enforcer version. + For more information,contact [PerimeterX Support](support@perimeterx.com). ### Optional Configuration From f085c634bca43d4ecb9b440dc803ca745e84b88c Mon Sep 17 00:00:00 2001 From: pxjohnny Date: Mon, 25 Feb 2019 14:24:10 +0200 Subject: [PATCH 7/7] Version 5.1.0 --- CHANGELOG.md | 4 ++++ README.md | 26 +++++++++++++++++++++++--- lib/perimeterx.js | 2 +- package.json | 4 ++-- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bec0eb6..a18af88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [5.1.0] - 2019-02-25 +### Added +- Support for testing blocking flow in monitor mode + ## [5.0.0] - 2018-01-11 ### Added - Full refactor of proxy support diff --git a/README.md b/README.md index f316476..4a696b3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [PerimeterX](http://www.perimeterx.com) Express.js Middleware ============================================================= -> Latest stable version: [v5.0.0](https://www.npmjs.com/package/perimeterx-node-express) +> Latest stable version: [v5.1.0](https://www.npmjs.com/package/perimeterx-node-express) Table of Contents ----------------- @@ -25,10 +25,10 @@ Table of Contents * [Sensitive Headers](#sensitiveHeaders) * [IP Headers](#ipHeaders) * [First Party Enabled](#firstPartyEnabled) - - * [Custom Request Handler](#customRequestHandler) + * [Custom Request Handler](#customRequestHandler) * [Additional Activity Handler](#additionalActivityHandler) * [Proxy Support](#proxySupport) + * [Test Block Flow on Monitoring Mode](#bypassMonitorHeader) - [Advanced Blocking Response](#advancedBlockingResponse) ## Installation @@ -322,6 +322,26 @@ const pxConfig = { ... }; ``` + +#### Test Block Flow on Monitoring Mode + +Allows you to test an enforcer’s blocking flow while you are still in Monitor Mode. + +When the header name is set(eg. `x-px-block`) and the value is set to `1`, when there is a block response (for example from using a User-Agent header with the value of `PhantomJS/1.0`) the Monitor Mode is bypassed and full block mode is applied. If one of the conditions is missing you will stay in Monitor Mode. This is done per request. +To stay in Monitor Mode, set the header value to `0`. + +The Header Name is configurable using the `BypassMonitorHeader` property. + +**Default:** Empty + +```javascript +const pxConfig = { + ... + bypassMonitorHeader: "x-px-block" + ... +}; +``` + ## Advanced Blocking Response In special cases, (such as XHR post requests) a full Captcha page render might not be an option. In such cases, using the Advanced Blocking Response returns a JSON object continaing all the information needed to render your own Captcha challenge implementation, be it a popup modal, a section on the page, etc. The Advanced Blocking Response occurs when a request contains the *Accept* header with the value of `application/json`. A sample JSON response appears as follows: diff --git a/lib/perimeterx.js b/lib/perimeterx.js index a07b579..d364ac2 100644 --- a/lib/perimeterx.js +++ b/lib/perimeterx.js @@ -1,6 +1,6 @@ 'use strict'; -const MODULE_VERSION = 'NodeJS Module v5.0.0'; +const MODULE_VERSION = 'NodeJS Module v5.1.0'; const PxExpressClient = require('./pxclient'); const PxEnforcer = require('perimeterx-node-core').PxEnforcer; diff --git a/package.json b/package.json index ab908d4..1baf285 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "perimeterx-node-express", - "version": "5.0.0", + "version": "5.1.0", "description": "PerimeterX Express.js middleware to monitor and block traffic according to PerimeterX risk score", "main": "index.js", "directories": { @@ -30,7 +30,7 @@ "dependencies": { "cookie-parser": "^1.4.1", "moment": "^2.19.3", - "perimeterx-node-core": "~1.7.0" + "perimeterx-node-core": "~1.8.0" }, "devDependencies": { "express": "4.16.2",