On certain instances, some users have their REST API of their site voluntarily blocked. Complianz relies on the REST API in order to work properly, and in cases like this, making an exclusion is mandatory.
The endpoint to exclude is: wp-json/complianz/v1/
Checking for Inadvertent REST API Blocks
On the opposite side, it could happen that the user inadvertently blocked the REST API. Some security and optimization plugins, such as Perfmatters, firewalls, or solutions like Sucuri, may block the REST API. If you encounter issues, check the settings of these plugins and ensure the endpoint above or the REST API is accessible.
You can identify this issue by opening the browser console in the front-end or back-end and looking for a 401 or 403 error. These errors should be visible to anyone.
REST API Failed: How to check the REST API Works
How to Deal with the Issue in Perfmatters
In the case of Perfmatters, you can restore the original behaviour by navigating to the Perfmatters Dashboard (found in WP Settings, or in the breadcrumb if not directly visible) and following these steps:
Go to in General sub-menu:
Set Disable REST API to Default (Enabled)
Once done, scroll down and click on Save Changes.
Whitelisting Complianz in Sucuri
To allow Complianz to function properly, you’ll need to whitelist its REST API endpoint in Sucuri. Please follow these steps:
- Access Sucuri Settings
Log into your Sucuri dashboard and go to Access Control → Allow URL Paths. - Add the Complianz Endpoint
In the Allow URL Paths section, add the following path:/wp-json/complianz/v1/
From the dropdown menu, select Matches, then click Allow. - Save the Changes
Once done, Complianz will be whitelisted in Sucuri, ensuring it can access the REST API without restrictions.
Still not working?
Please contact us so we can help identify the problem and potentially update the guide to assist the community. Kindly attach a screenshot of the console errors you see, along with a list of the active plugins.