You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<aname="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.
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
<aname="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
classHomeController < ApplicationController
331
311
includePxModule
332
312
333
-
334
313
before_action do call_perimeterx_verify_request end
335
314
336
315
defcall_perimeterx_verify_request
@@ -349,6 +328,7 @@ end
349
328
```
350
329
351
330
<aname="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`, 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
+
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
0 commit comments