Skip to content

Commit 4be9381

Browse files
authored
Merge pull request #54 from PerimeterX/dev
Dev
2 parents 9e23de7 + 711264e commit 4be9381

File tree

4 files changed

+13
-27
lines changed

4 files changed

+13
-27
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [2.2.1] - 2020-09-27
9+
### Fixed
10+
- bypass_monitor_header type validation
11+
812
## [2.2.0] - 2020-09-15
913
### Added
1014
- First Party

lib/perimeterx/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Configuration
5454
:whitelist_routes => {types: [Array], allowed_element_types: [String, Regexp], required: false},
5555
:ip_headers => {types: [Array], allowed_element_types: [String], required: false},
5656
:ip_header_function => {types: [Proc], required: false},
57-
:bypass_monitor_header => {types: [FalseClass, TrueClass], required: false},
57+
:bypass_monitor_header => {types: [String], required: false},
5858
:risk_cookie_max_iterations => {types: [Integer], required: false},
5959
:custom_verification_handler => {types: [Proc], required: false},
6060
:additional_activity_handler => {types: [Proc], required: false},

lib/perimeterx/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module PxModule
2-
VERSION = '2.2.0'
2+
VERSION = '2.2.1'
33
end

readme.md

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[PerimeterX](http://www.perimeterx.com) Ruby SDK
66
=============================================================
77

8-
> Latest stable version: [v2.1.0](https://rubygems.org/gems/perimeter_x)
8+
> Latest stable version: [v2.2.1](https://rubygems.org/gems/perimeter_x)
99
1010
Table of Contents
1111
-----------------
@@ -19,8 +19,6 @@ Table of Contents
1919
* [Blocking Score](#blocking-score)
2020
* [Custom Verification Action](#custom-verification-action)
2121
* [Custom Block Page](#custom-block-page)
22-
* [Enable/Disable Captcha](#captcha-support)
23-
* [Select Captcha Provider](#captcha-provider)
2422
* [Extracting Real IP Address](#real-ip)
2523
* [Custom URI](#custom-uri)
2624
* [Filter Sensitive Headers](#sensitive-headers)
@@ -225,26 +223,6 @@ Default mode: PxModule::ACTIVE_MODE
225223
params[:module_mode] = PxModule::MONITOR_MODE
226224
```
227225

228-
<a name="captcha-support"></a>**Enable/Disable CAPTCHA on the block page**
229-
Default mode: enabled
230-
231-
By enabling CAPTCHA support, a CAPTCHA will be served as part of the block page, giving real users the ability to identify as a human. By solving the CAPTCHA, the user's score is then cleaned up and the user is allowed to continue normal use.
232-
233-
```ruby
234-
params[:captcha_enabled] = false
235-
```
236-
237-
<a name="captcha-provider"></a>**Select CAPTCHA Provider**
238-
239-
The CAPTCHA part of the block page can use one of the following:
240-
* [reCAPTCHA](https://www.google.com/recaptcha)
241-
242-
Default: 'reCaptcha'
243-
244-
```ruby
245-
captchaProvider = "reCaptcha"
246-
```
247-
248226
<a name="custom-uri"></a>**Custom URI**
249227

250228
Default: 'REQUEST_URI'
@@ -326,11 +304,12 @@ However, it is possible to override configuration options on each request.
326304
To do so, send the configuration options as an argument when calling to `px_verify_request` as described in the following example.
327305
Notice that in case of an invalid argument, the module will raise an error. Therefore, when using this feature, make sure to wrap the call to `px_verify_request` with begin and rescue. It is highly recommended to log the error message to follow such errors.
328306

307+
Usage example:
308+
329309
```ruby
330310
class HomeController < ApplicationController
331311
include PxModule
332312

333-
334313
before_action do call_perimeterx_verify_request end
335314

336315
def call_perimeterx_verify_request
@@ -349,6 +328,7 @@ end
349328
```
350329

351330
<a name="first-party"></a>**First Party**
331+
352332
To enable first party on your enforcer, add the following routes to your `config/routes.rb` file:
353333

354334
```ruby
@@ -357,11 +337,13 @@ To enable first party on your enforcer, add the following routes to your `config
357337
post '/:appid_postfix/xhr/:all', to: 'home#index', constraints: { appid_postfix: /XXXXXXXX/, all:/.*/ }
358338
```
359339

360-
Notice that all occurences of `XXXXXXXX` should be replaced with your px_app_id without the "PX" prefix. For example, if your px_app_id is `PX2H4seK9L`, reeplace `XXXXXXXX` with `2H4seK9L`.
340+
Notice that all occurences of `XXXXXXXX` should be replaced with your px_app_id without the "PX" prefix. For example, if your px_app_id is `PX2H4seK9L`, replace `XXXXXXXX` with `2H4seK9L`.
341+
361342
In case you are using more than one px_app_id, provide all of them with a `|` sign between them. For example: 2H4seK9L|9bMs6K94|Lc5kPMNx
362343

363344

364345
First Party configuration:
346+
365347
Default: true
366348

367349
```ruby

0 commit comments

Comments
 (0)