perimeter_x 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/changelog.md +4 -0
- data/lib/perimeterx/configuration.rb +1 -1
- data/lib/perimeterx/version.rb +1 -1
- data/readme.md +7 -25
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cb2ccba081bcd941104fd775fc6d047b1b82f9adc6c43619ab860ab1c9685b5
|
4
|
+
data.tar.gz: 11b5d9a8addcbc817e7e8f30ba5216e3b16c8392088abbc6c72295b53a39720e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 205b0471f18b749671b9f481af16d032c4559b6505e1f6a1198883ea8935f8acf11583433b14ba88a1e51e0eadd004462e49d2167e6e7bd09fe0ddcf4a2afd98
|
7
|
+
data.tar.gz: 5767dbf74d101d8859b5c74453d9e5ea314721d7bb3489678e0837448bca5eff1210d7fe387d0bae40c5a3ae0de0d305eb55faa4c6d28619e32b29e704c2d0f7
|
data/changelog.md
CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
7
7
|
|
8
|
+
## [2.2.1] - 2020-09-27
|
9
|
+
### Fixed
|
10
|
+
- bypass_monitor_header type validation
|
11
|
+
|
8
12
|
## [2.2.0] - 2020-09-15
|
9
13
|
### Added
|
10
14
|
- First Party
|
@@ -54,7 +54,7 @@ module PxModule
|
|
54
54
|
:whitelist_routes => {types: [Array], allowed_element_types: [String, Regexp], required: false},
|
55
55
|
:ip_headers => {types: [Array], allowed_element_types: [String], required: false},
|
56
56
|
:ip_header_function => {types: [Proc], required: false},
|
57
|
-
:bypass_monitor_header => {types: [
|
57
|
+
:bypass_monitor_header => {types: [String], required: false},
|
58
58
|
:risk_cookie_max_iterations => {types: [Integer], required: false},
|
59
59
|
:custom_verification_handler => {types: [Proc], required: false},
|
60
60
|
:additional_activity_handler => {types: [Proc], required: false},
|
data/lib/perimeterx/version.rb
CHANGED
data/readme.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
[PerimeterX](http://www.perimeterx.com) Ruby SDK
|
6
6
|
=============================================================
|
7
7
|
|
8
|
-
> Latest stable version: [v2.1
|
8
|
+
> Latest stable version: [v2.2.1](https://rubygems.org/gems/perimeter_x)
|
9
9
|
|
10
10
|
Table of Contents
|
11
11
|
-----------------
|
@@ -19,8 +19,6 @@ Table of Contents
|
|
19
19
|
* [Blocking Score](#blocking-score)
|
20
20
|
* [Custom Verification Action](#custom-verification-action)
|
21
21
|
* [Custom Block Page](#custom-block-page)
|
22
|
-
* [Enable/Disable Captcha](#captcha-support)
|
23
|
-
* [Select Captcha Provider](#captcha-provider)
|
24
22
|
* [Extracting Real IP Address](#real-ip)
|
25
23
|
* [Custom URI](#custom-uri)
|
26
24
|
* [Filter Sensitive Headers](#sensitive-headers)
|
@@ -225,26 +223,6 @@ Default mode: PxModule::ACTIVE_MODE
|
|
225
223
|
params[:module_mode] = PxModule::MONITOR_MODE
|
226
224
|
```
|
227
225
|
|
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
|
-
|
248
226
|
<a name="custom-uri"></a>**Custom URI**
|
249
227
|
|
250
228
|
Default: 'REQUEST_URI'
|
@@ -326,11 +304,12 @@ However, it is possible to override configuration options on each request.
|
|
326
304
|
To do so, send the configuration options as an argument when calling to `px_verify_request` as described in the following example.
|
327
305
|
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.
|
328
306
|
|
307
|
+
Usage example:
|
308
|
+
|
329
309
|
```ruby
|
330
310
|
class HomeController < ApplicationController
|
331
311
|
include PxModule
|
332
312
|
|
333
|
-
|
334
313
|
before_action do call_perimeterx_verify_request end
|
335
314
|
|
336
315
|
def call_perimeterx_verify_request
|
@@ -349,6 +328,7 @@ end
|
|
349
328
|
```
|
350
329
|
|
351
330
|
<a name="first-party"></a>**First Party**
|
331
|
+
|
352
332
|
To enable first party on your enforcer, add the following routes to your `config/routes.rb` file:
|
353
333
|
|
354
334
|
```ruby
|
@@ -357,11 +337,13 @@ To enable first party on your enforcer, add the following routes to your `config
|
|
357
337
|
post '/:appid_postfix/xhr/:all', to: 'home#index', constraints: { appid_postfix: /XXXXXXXX/, all:/.*/ }
|
358
338
|
```
|
359
339
|
|
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`,
|
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
|
+
|
361
342
|
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
|
362
343
|
|
363
344
|
|
364
345
|
First Party configuration:
|
346
|
+
|
365
347
|
Default: true
|
366
348
|
|
367
349
|
```ruby
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: perimeter_x
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nitzan Goldfeder
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|