> This page is for Applications Protection.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.humansecurity.com/llms.txt.

# 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.

* If your `px_config` block does not contain the *first\_party* directive, then continue to the [Next Steps](#next-steps) section below.
* Otherwise, proceed to the next section, [First Party Mode Disabled Example](#first-party-mode-disabled-example).

```python
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.

```none
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](/applications/integrate-1st-party-client) to make sure your snippet is setup to serve the Javascript Sensor via First Party.