Required Configuration

To use PerimeterX middleware on a specific route follow this example:

from perimeterx.middleware import PerimeterX

px_config = {
    'app_id': 'APP_ID',
    'cookie_key': 'COOKIE_KEY',
    'auth_token': 'AUTH_TOKEN',
}
application = get_wsgi_application()
application = PerimeterX(application, px_config)
  • The PerimeterX Application ID / AppId and PerimeterX Token / Auth Token can be found in the Portal, in Applications.
  • PerimeterX Risk Cookie / Cookie Key can be found in the portal, in Policies.
    The Policy from where the Risk Cookie / Cookie Key is taken must correspond with the Application from where the Application ID / AppId and PerimeterX Token / Auth Token.
    For details on how to create a custom Captcha page, refer to the documentation

Did this page help you?