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
      • Changelog
      • Installation
      • API
      • Configuration
    • Envoy Proxy
    • F5 BIGIP
    • Fastly JavaScript Compute@Edge
    • Google Cloud Platform (GCP) Callout Enforcer
    • Kong Plugin
    • NGINX - C Module
    • NGINX - LUA Module
    • PHP
    • Python
    • Ruby
    • Salesforce Commerce Cloud Cartridge
LogoLogo
Login
Login
HUMAN DashboardHUMAN WebsiteRequest a Demo
On this page
  • createEnforcedRequestHandler()
  • HumanSecurity
  • constructor
  • createEnforcer()
  • Enforcer
  • enforce()
  • postEnforce()
Enforcer frameworksEdgio Edge Functions

API

Was this page helpful?
Previous

Configuration

Next
Built with

createEnforcedRequestHandler()

A function that returns a default request handler with built-in HUMAN enforcement. Useful if there is little request/response manipulation in your Edgio Edge Function.

1createEnforcedRequestHandler(
2 config: HumanSecurityConfiguration,
3 onPass: (request: Request) => Response | Promise<Response>,
4 onResponse?: (response: Response) => Response | Promise<Response>,
5) => ((request: Request, context: Context) => Promise<Response>)
  • Parameters
    • config: HumanSecurityConfiguration
    • onPass: (request: Request) => Response | Promise[[Response](https://docs.edg.io/guides/v7/edge-functions#response-class)\](Response)
    • onResponse?: (response: Response) => Response | Promise[[Response](https://docs.edg.io/guides/v7/edge-functions#response-class)\](Response)
  • Returns a default HTTP request handler function in the form of (request: Request, context: Context) => Promise[[Response](https://docs.edg.io/guides/v7/edge-functions#response-class)\](Response)

HumanSecurity

constructor

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

1constructor(params: HumanSecurityConfiguration) => HumanSecurity
  • Parameters
    • params: ConfigurationParams
  • Returns a new instance of the HumanSecurity class

createEnforcer()

Creates a new Enforcer instance.

1createEnforcer() => Enforcer
  • Returns a new Enforcer instance with the configurations provided to the HumanSecurity instance

Enforcer

The entity responsible for performing HUMAN enforcement.

enforce()

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

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

postEnforce()

Performs any post-enforcement processing actions and final modifications to (i.e., setting cookies or headers on) the response if needed.

1postEnforce(response: Response) => Promise<void>
  • Parameters
    • response: Response
  • Returns a Promise resolving to void