For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HUMAN DashboardHUMAN WebsiteRequest a Demo
Product GuidesEnforcer GuidesMobile SDKAPI ReferenceCustomer support
Product GuidesEnforcer GuidesMobile SDKAPI ReferenceCustomer support
  • General
    • About Enforcers
    • Support first-party HUMAN calls
    • Troubleshoot Enforcer configurations
  • Enforcer frameworks
    • Akamai ESI
    • Apache - C Module
    • ASP.NET
    • Callout Enforcer
    • Envoy Proxy
    • F5 BIGIP
    • Fastly JavaScript Compute@Edge
    • Google Cloud Platform (GCP) Callout Enforcer
    • Kong Plugin
    • NGINX - C Module
    • NGINX - LUA Module
      • What's New
      • Installation
      • API
      • Configuration
      • Configuration Options (7.9.0 and below)
      • Upgrading to Version 8
    • PHP
    • Python
    • Ruby
    • Salesforce Commerce Cloud Cartridge
LogoLogo
Login
Login
HUMAN DashboardHUMAN WebsiteRequest a Demo
On this page
  • createHumanSecurityHandler()
  • HumanSecurityEnforcer
  • constructor
  • enforce()
  • postEnforce()
Enforcer frameworksNodeJS Express

API

Was this page helpful?
Previous

Configuration

Next
Built with

createHumanSecurityHandler()

An out-of-the box handler with the HUMAN Enforcer returns a default Express middleware function with built-in HUMAN enforcement.

1createEnforcedRequestHandler(config: HumanSecurityConfiguration) => RequestHandler
  • Parameters
    • config: HumanSecurityConfiguration
  • Returns a default HTTP request handler function in the form of (request: Express Request, response: Express Response, next: NextFunction) => Promise<Response>

HumanSecurityEnforcer

The entity responsible for performing HUMAN enforcement.

constructor

Creates a new HumanSecurityEnforcer instance from a HumanSecurityConfiguration object (see the configuration section for more information).

1constructor(configuration: HumanSecurityConfiguration) => HumanSecurityEnforcer
  • Parameters
    • config: HumanSecurityConfiguration
  • Returns a new instance of the HumanSecurityEnforcer

enforce()

Executes the enforcement functionality, returning either a response or null depending on which action should be taken.

1enforce(request: Request, response: Response) => Promise<Response | null>
  • Parameters
    • request: Express Request
    • response: Express Response
  • Returns a Promise resolving to an Express Response or null

postEnforce()

Performs any post-enforcement processing actions such as sending HUMAN data to the collector.

1postEnforce(request: Request, response: Response) => Promise<void>
  • Parameters
    • request: Express Request
    • response: Express Response
  • Returns: void