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
    • PHP
    • Python
      • What's New
      • Installation
      • Required Configuration
      • Configuration Options
      • Upgrading
      • First Party Configuration
    • 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
  • Additional Routes (Optional)
  • Next Steps
Enforcer frameworksPython

First Party Configuration

Was this page helpful?
Previous

Ruby

Next
Built with

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.

  • If your px_config block does not contain the first_party directive, then continue to the Next Steps section below.
  • Otherwise, proceed to the next section, First Party Mode Disabled Example.
1px_config = {
2 'app_id': 'APP_ID',
3 'cookie_key': 'COOKIE_KEY',
4 'auth_token': 'AUTH_TOKEN',
5}

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.

1px_config = {
2 'app_id': 'APP_ID',
3 'cookie_key': 'COOKIE_KEY',
4 'auth_token': 'AUTH_TOKEN',
5 'first_party': false
6}

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.