Installation
Prerequisites
The HUMAN Edgio Enforcer uses Node.js and Edgio’s CDN as Code. Ensure you’ve satisfied the Edgio prerequisites.
The Enforcer is supported for Edgio Core v6.x and Node.js 16.
Installation
-
Create an Edgio property (if you haven’t already) by following the instructions here.
-
Install the HUMAN Enforcer into your Edgio project.
- Integrate the HUMAN Enforcer into your
routes.js
file.
For an out-of-the box Router with the HUMAN Enforcer integrated into it already, simply import and use the createDefaultEnforcedRouter
function.
The example below shows what the createDefaultEnforcedRouter()
function does behind the scenes. For a more customized solution (e.g., multiple route patterns, multiple origins), create a new HumanSecurity
instance and use it on your Router’s match functions as needed.
Matching static content must be done before match calls that invoke `compute` to ensure caching.
- Add any environment variables needed and deploy to your desired Edgio environment.
Bash