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
      • Supported Features
      • Installing the Enforcer
      • Configuration Options
      • Upgrading the Enforcer
      • HUMAN Plugin Configuration
      • First Party Configuration
      • Enrichment
    • PHP
    • Python
    • Ruby
    • Salesforce Commerce Cloud Cartridge
LogoLogo
Login
Login
HUMAN DashboardHUMAN WebsiteRequest a Demo
On this page
  • First Party
Enforcer frameworksNGINX - LUA Module

First Party Configuration

Was this page helpful?
Previous

Enrichment

Next
Built with

First Party

First Party Mode enables the module to send/receive data to/from the sensor, acting as a reverse-proxy for client requests and sensor activities.

First Party Mode requires swapping the 3rd Party JS Snippet with the First Party JS Snippet.

  • By default the enforcer is configured to respond to First Party requests. One can confirm this by inspecting the HUMAN Lua Module configuration file: /usr/local/lib/lua/px/pxconfig.lua
1_M.first_party_enabled = true
  • If the HUMAN Lua module is enabled on location /, the routes are already open and no action is necessary.
    One can test that the endpoint is responding by browsing to domain.com/<PX_APP_ID without PX prefix>/init.js in which one will receive the First Party JS Sensor.
1server {
2 listen 80;
3
4 location / {
5 #----- PerimeterX protect location -----#
6 access_by_lua_block {
7 local pxconfig = require("px.pxconfig")
8 require("px.pxnginx").application(pxconfig)
9 }
10 #----- PerimeterX Module End -----#
11
12 root /nginx/www;
13 index index.html;
14 }
15}
  • If the HUMAN Lua module is NOT enabled on location / then he following routes must be configured within NGINX for First Party Mode to work:
1server {
2 listen 80;
3
4 location /<PX_APP_ID without PX prefix>/xhr/* {
5 #----- PerimeterX protect location -----#
6 access_by_lua_block {
7 local pxconfig = require("px.pxconfig")
8 require("px.pxnginx").application(pxconfig)
9 }
10 #----- PerimeterX Module End -----#
11 }
12
13 location /<PX_APP_ID without PX prefix>/init.js {
14 #----- PerimeterX protect location -----#
15 access_by_lua_block {
16 local pxconfig = require("px.pxconfig")
17 require("px.pxnginx").application(pxconfig)
18 }
19 #----- PerimeterX Module End -----#
20 }
21}

If your NGINX version supports HTTP v2, refer to the HTTP v2 Support section here.

The HUMAN NGINX Lua Plugin configuration requirements must be completed before proceeding to the next stage of installation.