Skip to content

Commit

Permalink
Merge pull request #54 from PerimeterX/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
chennakarpx authored Sep 27, 2020
2 parents 9e23de7 + 711264e commit 4be9381
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

## [2.2.1] - 2020-09-27
### Fixed
- bypass_monitor_header type validation

## [2.2.0] - 2020-09-15
### Added
- First Party
Expand Down
2 changes: 1 addition & 1 deletion lib/perimeterx/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Configuration
:whitelist_routes => {types: [Array], allowed_element_types: [String, Regexp], required: false},
:ip_headers => {types: [Array], allowed_element_types: [String], required: false},
:ip_header_function => {types: [Proc], required: false},
:bypass_monitor_header => {types: [FalseClass, TrueClass], required: false},
:bypass_monitor_header => {types: [String], required: false},
:risk_cookie_max_iterations => {types: [Integer], required: false},
:custom_verification_handler => {types: [Proc], required: false},
:additional_activity_handler => {types: [Proc], required: false},
Expand Down
2 changes: 1 addition & 1 deletion lib/perimeterx/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module PxModule
VERSION = '2.2.0'
VERSION = '2.2.1'
end
32 changes: 7 additions & 25 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[PerimeterX](http://www.perimeterx.com) Ruby SDK
=============================================================

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

<a name="captcha-support"></a>**Enable/Disable CAPTCHA on the block page**
Default mode: enabled

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.

```ruby
params[:captcha_enabled] = false
```

<a name="captcha-provider"></a>**Select CAPTCHA Provider**

The CAPTCHA part of the block page can use one of the following:
* [reCAPTCHA](https://www.google.com/recaptcha)

Default: 'reCaptcha'

```ruby
captchaProvider = "reCaptcha"
```

<a name="custom-uri"></a>**Custom URI**

Default: 'REQUEST_URI'
Expand Down Expand Up @@ -326,11 +304,12 @@ However, it is possible to override configuration options on each request.
To do so, send the configuration options as an argument when calling to `px_verify_request` as described in the following example.
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.

Usage example:

```ruby
class HomeController < ApplicationController
include PxModule


before_action do call_perimeterx_verify_request end

def call_perimeterx_verify_request
Expand All @@ -349,6 +328,7 @@ end
```

<a name="first-party"></a>**First Party**

To enable first party on your enforcer, add the following routes to your `config/routes.rb` file:

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

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`.
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`.

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


First Party configuration:

Default: true

```ruby
Expand Down

0 comments on commit 4be9381

Please sign in to comment.