First Party Configuration

This page explains how to configure the Fastly Enforcer to be able to handle First Party calls from the Javascript Snippet.

First Party Mode

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

As an Edge Enforcer, the Fastly Enforcer is configured with First-Party enabled by default.
In case of failover, the Javascript Snippet sends requests directly to the PerimeterX servers in Third-Party Mode.

To confirm that you have configured your PerimeterX Fastly Enforcer in First-Party mode do the following:

  1. Login to your Fastly Portal
  2. Open the configuration for the service that is running the PerimeterX Enforcer
  3. Navigate to the Custom VCL section
  4. Locate your PX_CONFIGS VCL and click the View Source link next to PX_CONFIGS
  5. In the PX_CONFIGS table FIRST_PARTY_MODE should be set to 1 (as shown below)
table px_configs {
  "JS_REF": "",
  "REDIRECT_XHR": "1",



If FIRST_PARTY_MODE is 0, you need to edit your PX_CONFIGS and change the value to 1 and re-deploy the configuration before moving to the next step.

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

Did this page help you?