If your organization uses Netlify, you can use HUMAN’s Netlify Edge Function Enforcer to protect against malicious behavior. The Netlify Edge Function is deployed to your content delivery network (CDN) and dictates how traffic should be handled per your organization’s standards.
You can learn how to install the Netlify Edge Function Enforcer with this article.
nvm install stable in your CLI to install it.There are two parts to the integration. Be sure to complete each part in order.
npm install perimeterx-node-core-ts to install the Enforcer package.Do not import the package using the npm: prefix in an import statement. Netlify does not support this syntax, and it will not install the package properly if you use it.
Your Netlify Edge Function project directory should now have the package installed. Next, move on to Use the package to complete your integration.
At the beginning of your function, add the HUMAN configurations using the PXRawConfig object as shown.
PX_APP_ID corresponds to your Application ID.PX_COOKIE_SECRET corresponds to your Risk Cookie Key.PX_AUTH_TOKEN corresponds to your Server Token.While you can add PX_APP_ID, PX_COOKIE_SECRET, and PX_AUTH_TOKEN directly, we recommend using Netlify environment variables so your configuration is more flexible and secure. See Netlify’s help documentation for more information.
PXRawConfig object. You can find all available configurations in our help article.While all other custom configurations are optional, you must include the px_extract_user_ip property as shown in Step 3. This lets HUMAN extract the correct end user IP.
PXRawConfig object, add the following lines of code. These let HUMAN evaluate the request as soon as it hits the function.Config object. Otherwise, move on to Step 7. By default, the Enforcer will run on all requests.Your Netlify Edge Function has now been integrated with the HUMAN Enforcer. Once you complete your installation, be sure to contact HUMAN to complete your Tuning process.