First Party Configuration

In First Party Mode, the HUMAN Python Enforcer acts as a reverse proxy for client requests and sensor activity.

px_config is configured with First-Party mode enabled by default.

To confirm that you have configured your HUMAN Python Enforcer in First-Party mode, review the px_config block.

First Party Enabled Example (default value)

Below is an example of a basic px_config block. The absence of the first_party confirms that the default setting of enable First Party Mode is active.

px_config = {
    'app_id': 'APP_ID',
    'cookie_key': 'COOKIE_KEY',
    'auth_token': 'AUTH_TOKEN',
}

First Party Mode Disabled Example

Below is an example of a basic configuration for the Python Enforcer with First-Party mode disabled. The presence of first_party with a value of false confirms that the default configuration has been changed and First-Party mode is disabled.

px_config = {
    'app_id': 'APP_ID',
    'cookie_key': 'COOKIE_KEY',
    'auth_token': 'AUTH_TOKEN',
    'first_party': false
}

In order to enable First-Party Mode, set first_party to true in the px_config block.

Additional Routes (Optional)

In First-Party mode, sensor calls are made to yourdomain.com/<PerimeterX-app-id-PX>/*. For example, if your AppID is PX1234567 the path would be yourdomain/1234567/*`. This new route must be added to your application.

Next Steps

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