Custom Parameters

Custom Parameters

The Custom Parameters function allows you to enrich activities sent from your Enforcer with additional data.

This may include user ID, session ID, or other parameters that you think HUMAN should have access to. The number of custom parameters is limited to 10.

Custom parameters are added as HTTP headers to the requests in the following format:

X-PX-custom-param#, where # is replaced with numbers 1 - 10

(e.g., X-PX-custom-param1, X-PX-custom-param2, … up to X-PX-custom-param10).

You must set custom parameters both on the HUMAN Portal and in the Enforcer's px_custom.vcl file. The number and type of custom parameters in both settings must be the same.

TO set custom parameters:

  1. Open the PX_CUSTOM.vcl file.
  2. Add the required parameters using the following format:

Example

sub px_custom_add_custom_parameters {
  set req.http.X-PX-custom-param1 = "hardcoded_value";
  set req.http.X-PX-custom-param2 = req.method;
  set req.http.X-PX-custom-param3 = req.http.X-Custom-Header;
}