First Party Configuration

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

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

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

First Party Enabled Example (default value)

The following example shows a basic nginx.conf configuration file for the PerimeterX 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;
        }
    }
}

First Party Mode Disabled Example

Below is an example of a basic nginx.conf configuration file for the PerimeterX 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 NGNIX 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.


Did this page help you?