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 changelog
      • Supported Features
      • Installation
      • Module Configuration
      • Configuration Options
      • Enrichment
      • First Party Configuration
      • Nginx Docker Image
      • Ingress NGINX Controller with HUMAN Enforcer
    • NGINX - LUA Module
    • PHP
    • Python
    • Ruby
    • Salesforce Commerce Cloud Cartridge
LogoLogo
Login
Login
HUMAN DashboardHUMAN WebsiteRequest a Demo
On this page
  • First Party Enabled Example (default value)
  • First Party Mode Disabled Example
  • Next Steps
Enforcer frameworksNGINX - C Module

First Party Configuration

Was this page helpful?
Previous

Nginx Docker Image

Next
Built with

In First Party Mode, the NGINX C-Core module acts as a reverse proxy for client requests and sensor activity.

The NGINX C-Core module is configured with First-Party mode enabled by default.

To confirm that you have configured your NGINX C-Core module in First-Party mode, review the server block in your Nginx configuration that contains the necessary details.

First Party Enabled Example (default value)

The following example shows a basic nginx.conf configuration file for the NGINX C-Core module:

$worker_processes 1;
$error_log /var/log/nginx/error.log debug;
$events {
> worker_connections 1024;
>}
$
$http {
> real_ip_header X-Forwarded-For;
> resolver 8.8.8.8;
>
> server {
> listen 80;
> listen [::]:80;
>
> px_enabled true;
> px_appId "<PX_APP_ID>";
> px_auth_token "<PX_AUTH_TOKEN>";
> px_cookie_secret "<COOKIE_ENCRYPTION_KEY>";
>
> location / {
> root /nginx/www;
> index index.html;
> include /nginx/conf/mime.types;
> }
> }
>}
  • If px_first_party_enabled is not found in the server block, the First-Party Mode is enabled in the Enforcer. (Continue to the Next Steps below.
  • Otherwise, proceed to the First Party Mode Disabled Example.

First Party Mode Disabled Example

Below is an example of a basic nginx.conf configuration file for the NGINX C-Core module.

The presence of the px_first_party_enabled with a value of false confirms that the default configuration has been changed and First-Party mode is disabled.

$worker_processes 1;
$error_log /var/log/nginx/error.log debug;
$events {
> worker_connections 1024;
>}
$
$http {
> real_ip_header X-Forwarded-For;
> resolver 8.8.8.8;
>
> server {
> listen 80;
> listen [::]:80;
>
> px_enabled true;
> px_appId "<PX_APP_ID>";
> px_auth_token "<PX_AUTH_TOKEN>";
> px_cookie_secret "<COOKIE_ENCRYPTION_KEY>";
> px_first_party_enabled false;
>
> location / {
> root /nginx/www;
> index index.html;
> include /nginx/conf/mime.types;
> }
> }
>}

In order to enable First Party Mode, you need to set the px_first_party_enabled to true and reload your NGINX configuration and continue to the Next Steps below.

Next Steps

After configuring the enforcer to handle First Party requests, complete the steps listed on the Integrate 1st-Party JS Snippet to confirm your snippet is setup to serve the Javascript Sensor via First-Party.