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
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:
874
+
875
+
```javascript
876
+
{
877
+
"appId":String,
878
+
"jsClientSrc":String,
879
+
"firstPartyEnabled":Boolean,
880
+
"vid":String,
881
+
"uuid":String,
882
+
"hostUrl":String,
883
+
"blockScript":String
884
+
}
885
+
```
886
+
887
+
Once you have the JSON response object, you can pass it to your implementation (with query strings or any other solution) and render the Captcha challenge.
888
+
889
+
In addition, you can add the `_pxOnCaptchaSuccess` callback function on the window object of your Captcha page to react according to the Captcha status. For example when using a modal, you can use this callback to close the modal once the Captcha is successfullt solved. <br/> An example of using the `_pxOnCaptchaSuccess` callback is as follows:
890
+
891
+
```javascript
892
+
window._pxOnCaptchaSuccess=function(isValid) {
893
+
if(isValid) {
894
+
alert("yay");
895
+
} else {
896
+
alert("nay");
897
+
}
898
+
}
899
+
```
900
+
901
+
For details on how to create a custom Captcha page, refer to the [documentation](https://console.perimeterx.com/docs/server_integration_new.html#custom-captcha-section)
902
+
866
903
<aname="appendix"></a> Appendix
867
-
-----------------------------------------------
904
+
--------------------------------
868
905
869
906
### <aname="http2"></a> HTTP v2 Support
870
907
The PerimeterX NGINX module supports HTTP v2 for both Third-Party and First-Party implementations. To verify that your NGINX is running with HTTP v2 support, run:
0 commit comments