Fastly VCL v12 configuration options
Each Enforcer has a set of configuration options that control the Enforcer’s functionality and features. While some are required, many of these are optional configurations that you can use to customize the Enforcer’s behavior. You can reference available configurations with this article. You define and update Fastly VCL Enforcer configuration in the PX_CONFIGS VCL file (table px_configs) and, for custom logic, in the PX_CUSTOM VCL file. Some Remote Configuration values also require entries in Fastly dictionaries such as px_private and px_enforcer_config_rdata.
While all Enforcers come with the same set of required configurations, the optional configurations available for each may differ. We recommend updating to the latest Enforcer version to ensure you have access to the latest features and configurations.
Quick reference
Basic functionality
Basic features
Optional
Required configurations
These configurations are necessary for the Enforcer’s basic functionality and features.
Basic functionality configurations
px_app_id
Your HUMAN Application ID in the form of PX12AB34CD. You can copy this value from the HUMAN Console in Platform Settings > Applications Overview. If you have multiple applications, make sure to copy the ID of the application you want the Enforcer on.
px_auth_token
The application’s server token needed to authorize with HUMAN’s backend. You can copy this value from the HUMAN Console in Platform Settings > Applications Overview > Click the appropriate application > Server token tab.
px_cookie_secret
The secret used to encrypt and decrypt the risk cookie sent from the HUMAN Sensor. You can copy this value from the HUMAN Console in Sightline Cyberfraud Defense > Traffic Policy Overview > Click the appropriate application > Click the key > Copy value.
If you need to rotate secrets, then adjust this configuration to be the new generated cookie secret, then add an additional field name, px_cookie_secret_old, that holds the previous cookie secret value.
px_backend_url
Do not set this value unless directed by your HUMAN Solutions Engineer.
The base URL for the HUMAN SAPI (Risk API and related calls). If empty, the Enforcer uses the default host for your Application ID.
px_s2s_timeout
Adding this value in the px_configs table has no effect. Set connect_timeout, first_byte_timeout, and between_bytes_timeout on the PX_API backend in the PX_CONFIGS VCL file.
The total time in milliseconds that the Enforcer will wait for the Risk API request to return before timing out and passing the request.
Basic feature configurations
px_logger_severity
The severity at which the logger will output logs.
none: The logger will not generate any logs.error: The logger will only generate logs on fatal errors.debug: The logger will generate detailed logs for debugging purposes. Not recommended for production environments.
See px_logger_auth_token for a header-based alternative.
When set to error, logs are sent to the endpoint named by px_error_syslog_name. When set to debug, logs are sent to the endpoint named by px_debug_syslog_name.
px_custom_client_ip_extraction
By default, the Enforcer reports the value from the Fastly-Client-IP header. If that value is inaccurate, implement this subroutine to return the true client IP from a trusted custom header. Returning an empty string falls back to Fastly-Client-IP.
px_module_enabled
Whether the Enforcer module is enabled.
true: Enable the modulefalse: Disable the module
px_module_mode
The Enforcer’s operation mode.
monitor: The Enforcer performs all functions without returning block responses. Useful for analyzing and adjusting Enforcer behavior without serving block pages to end users. If you have routes that must have enforcement at all times, see Enforced routes.active_blocking: The Enforcer will return block responses as needed.
Optional configurations
These configurations aren’t required, but you can use them to further customize the Enforcer’s behavior.
Activity headers
px_custom_activity_headers
Fastly VCL cannot automatically report all request headers on async activities. Return a string of additional headers to include. Each header must use the form ",{%22name%22: %22<header name>%22, %22value%22: " if(req.http.<header name>, "%22" json.escape(req.http.<header name>) "%22", "null") "}".
Be sure to include the leading comma (,).
Additional activity handler
px_additional_activity_handler_enabled
Whether to invoke the px_custom_additional_activity_handler subroutine.
px_custom_additional_activity_handler
A custom subroutine that runs after the Enforcer prepares the page_requested or block activity and before forwarding the request to the next step in the pipeline. A common use case is to set the score as a variable or header so the application can read it and apply its own logic. HUMAN metadata is available on req.http.px-ctx. This subroutine is called in vcl_recv.
Advanced blocking response (ABR)
px_advanced_blocking_response_enabled
In specific cases such as XHR post requests, a full CAPTCHA page render might not be an option. In such cases, the Advanced Blocking Response (ABR) returns a JSON object containing all the information needed to render a customized CAPTCHA challenge implementation such as a popup modal, a section on the page, etc. This provides more flexibility and customizability in displaying the CAPTCHA challenge.
true: Enable ABRfalse: Disable ABR
Block oversized Risk requests
px_block_size_exceeded_15k_headers_size
Due to Fastly size limits, large Risk API requests may return HTTP 413. By default, the Enforcer fails open. When enabled, those requests are blocked instead.
Block result header
px_add_block_result_header
Whether to include px-ctx:block-result with value "0" (pass) or "1" (block) on origin requests. Useful while testing in monitor mode.
Bypass monitor header
px_bypass_monitor_header
Activates the full blocking flow to verify the flow works as expected if the specified header is present on the request with a value of 1. Often used to test the Enforcer block workflow during monitor mode, where the Enforcer usually collects data without blocking user requests, before switching to active_blocking. Requests with this header will go through the entire blocking workflow despite being in monitor mode.
To disable blocking behavior on the specified header, set the value to 0.
CORS support
You can configure the Enforcer to support Cross-Origin Resource Sharing (CORS) requests. CORS is a mechanism that lets the server indicate if a request contains cross-origin resources by adding special HTTP headers to the request. These headers let the browser load these resources. Without them, the browser may block requests to these resources for security reasons instead.
In most cases, CORS employs a two-stage procedure with a preliminary “preflight” request followed by the actual request. The preflight request checks if the actual request will be responded to. To learn more about different request types, see these examples.
You must configure the Enforcer to address both simple requests (without preflight) and more complex ones (with preflight) to support CORS requests.
px_cors_support_enabled
Whether to enable CORS support.
true: Enable CORS supportfalse: Disable CORS support
After setting this configuration to true, the Enforcer:
- Automatically adds the following default CORS response headers to block responses resulting from CORS requests.
- Activates the
px_custom_cors_set_custom_block_response_headersconfiguration, which lets you customize the block response headers via a custom function. - Activates the
px_cors_preflight_request_filter_enabledandpx_custom_cors_preflight_handlerconfigurations, which lets you filter and custom handle preflight requests.
px_cors_create_custom_block_response_headers_enabled
Whether to invoke px_custom_cors_set_custom_block_response_headers.
px_custom_cors_set_custom_block_response_headers
If the default CORS response headers are not sufficient, use this subroutine to customize the headers added to block responses resulting from CORS requests. If this subroutine is defined, the default CORS block headers are not added. Only the headers you set on obj are included.
px_cors_preflight_request_filter_enabled
Disables enforcement for CORS preflight requests. When set to true, CORS preflight requests will be pass through the Enforcer flow without triggering detection or block responses.
true: Filter out preflight requestsfalse: Don’t filter out preflight requests
px_cors_preflight_handler_enabled
Whether to invoke px_custom_cors_preflight_handler.
px_custom_cors_preflight_handler
A custom subroutine for handling CORS preflight requests. Use it to return a customized preflight response before enforcement. px_custom_cors_preflight_handler is invoked prior to determining whether to filter the request based on px_cors_preflight_request_filter_enabled. This lets you return customized responses for preflight requests that meet certain conditions and filter those that do not.
Credentials Intelligence
These configurations let you extract and detect compromised credentials. They’re closely related to Credentials Intelligence-related features in Sightline Cyberfraud Defense.
At minimum, ensure the following are configured to enable Credential Intelligence:
px_login_credentials_extraction_enabledis set totruepx_login_credentials_extractionis configured with at least one credential endpoint
px_login_credentials_extraction_enabled
Be sure to define a suffix for each endpoint (for example _0, _1) and append that suffix to each key. Pair this table with px_custom_is_login_request. The table is declared in PX_CUSTOM, or you can replace it with a Fastly dictionary of the same name.
Whether to enable the extraction and reporting of credentials from the Enforcer for Credential Intelligence.
true: Enable Credential Intelligencefalse: Disable Credential Intelligence
px_login_credentials_extraction
An array of configuration objects for each credential endpoint. Each element in the array is an object representing a distinct endpoint to which credentials are sent and includes:
- How to identify these credential-bearing requests
- How to extract the credentials from the request
- How to determine if the request operation (login, signup, etc.) was successful based on the returned HTTP response
Click to expand the full properties list.
Properties
path
The path of the request that contains the credentials. Store an exact path in the px_login_credentials_extraction table. For regex matching, implement the logic in px_custom_is_login_request.
method
The HTTP method of the request that contains the credentials. Supports "post" and "put".
sent_through
Whether the credentials should be extracted from the request body or via a defined custom callback.
"body": The credentials will be extracted according to the configureduser_fieldandpass_fieldvalues from the request body. Body size is limited to 8K per Fastly limits. The Enforcer parses the request body based on the followingContent-Typerequest header:application/jsonapplication/x-www-form-urlencoded
"custom": The credentials will be extracted by invokingpx_custom_login_extraction_callback.
user_field
Required if sent_through is set to "body". The name of the field containing the username in the request body.
On Fastly VCL, nested JSON fields are matched by leaf field name (period-separated paths are not required). For example, a body with { "user_info": { "username": "user123" } } can use user_field set to "username".
pass_field
Required if sent_through is set to "body". The name of the field containing the password in the request body.
On Fastly VCL, nested JSON fields are matched by leaf field name (period-separated paths are not required). For example, a body with { "authentication": { "password": "P@s$w0rD!" } } can use pass_field set to "password".
protocol
Whether to process credentials as part of single or multiple HTTP requests. By default, the module tries to process requests depending on which credential fields were extracted. If omitted, the Enforcer uses px_credentials_intelligence_version.
"v2": Both username and password are present on the same HTTP request and must be extracted successfully to trigger Credential Intelligence."multistep_sso": The username and password are delivered on different HTTP requests. Either the username or password, but not both, must be extracted successfully to trigger Credential Intelligence."both": The username and password may be present on the same HTTP request or on different HTTP requests. If either username or password is successfully extracted, the Enforcer will send the credentials according to the multistep_sso protocol. If both username and password are successfully extracted, the Enforcer will send the credentials according to the v2 protocol.
px_custom_is_login_request
Returns the credential endpoint suffix (for example _0 or _1) that matches the request path for px_login_credentials_extraction. Use this subroutine for exact or regex path matching.
px_custom_login_extraction_callback
Required if sent_through is set to "custom". A custom credential extraction subroutine that returns the raw credentials from the request. Use req.http.px-creds:endpoint-index to distinguish endpoints. Set req.http.px-creds:raw-username and req.http.px-creds:raw-password. If neither the username nor the password can be extracted, leave both unset.
px_login_successful_reporting_method
The method by which the Enforcer will determine whether the login request was successful.
"status": The Enforcer will determine if the login request was successful by evaluating the response status code againstpx_login_successful_status."header": The Enforcer will determine if the login request was successful whenresp.http.x-px-login-successfulis"1"."custom": The Enforcer will determine if the login request was successful by invokingpx_custom_set_login_successful_response_header.
px_login_successful_status
The default HTTP status codes that indicate a successful login. This takes effect when the px_login_successful_reporting_method is set to status.
Fastly VCL supports a single status code. For multiple status codes, use custom reporting with px_custom_set_login_successful_response_header.
px_custom_set_login_successful_response_header
Required if px_login_successful_reporting_method is set to "custom". A custom subroutine that inspects the HTTP response and indicates whether the login attempt was successful. Return "1" if the login succeeded or "0" otherwise. Invoked during vcl_deliver.
px_send_raw_username_on_additional_s2s_activity
Whether to report the raw username on the additional_s2s activity.
false: The raw username will never be reported.true: The raw username will only be reported if:- The credentials are compromised, and
- The login request was successful.
px_additional_s2s_activity_header_enabled
Whether to attach the additional_s2s payload and URL as headers to the original request. This is done so that the additional_s2s activity can be enriched with the proper login_successful value and sent to the provided URL at a later stage. Enabling this configuration disables automatic sending of additional_s2s activity.
When set to true, the following headers are added to the origin request:
px-additional-activity: A JSON object containing the payload of theadditional_s2sactivity. Thelogin_successfulandhttp_status_codefields should be set prior to sending the activity.px-additional-activity-url: The URL to which theadditional_s2spayload should be sent as an HTTP POST request.
px_credentials_intelligence_query_string
Whether to append compromised_credentials=true to the origin request URL when compromised credentials are identified. Unlike header-based signaling on other Enforcers, Fastly VCL can surface compromised credentials through the request query string.
px_compromised_credentials_returned_status_response
When px_credentials_intelligence_query_string is enabled and a successful login used compromised credentials, set the client response status to this value.
px_credentials_intelligence_version
The default credential hashing protocol applied to endpoints that do not specify a protocol field.
"v2": Both username and password are present on the same HTTP request and must be extracted successfully to trigger Credential Intelligence."multistep_sso": The username and password are delivered on different HTTP requests. Either the username or password, but not both, must be extracted successfully to trigger Credential Intelligence."both": The username and password may be present on the same HTTP request or on different HTTP requests. If either username or password is successfully extracted, the Enforcer will send the credentials according to the multistep_sso protocol. If both username and password are successfully extracted, the Enforcer will send the credentials according to the v2 protocol.
Prefer configuring protocol per endpoint in px_login_credentials_extraction.
Custom cookie header
px_custom_cookie_header
By default, the Enforcer extracts HUMAN cookies from the Cookie header. However, if these cookies are transferred on a different header, then that header’s name must be provided with this configuration.
Custom first party endpoints
These configurations let you use the Enforcer as a proxy for HUMAN servers and serve content to the browser from a first party endpoint. These are particularly useful when browser or extension restrictions that block JavaScript requests to other domains, such as adblockers, prevent the HUMAN Sensor from making requests to HUMAN’s backend. When this happens, it significantly limits HUMAN’s detection capabilities, so we recommend enabling these configurations to maintain full detection capabilities.
px_first_party_enabled
Whether to enable first party mode for Bot Defender or Sightline Cyberfraud Defense.
px_custom_first_party_prefix
Sets a custom prefix for first party routes to use in addition to the default prefix. By default, first party endpoints always begin with the Application ID without the initial “PX”. For example, if the ID is PX12345678, then all first party routes will take the form /12345678/*.
When configured, the Enforcer will respond to first party requests with endpoints matching the following patterns:
/<px_custom_first_party_prefix>/init.js/<px_custom_first_party_prefix>/xhr/*/<px_custom_first_party_prefix>/captcha/*
If empty, the configuration will use the default as described above.
px_custom_first_party_sensor_endpoint
Customizes the entire first party Sensor script endpoint. By default, for an Application ID PX12345678, the first party endpoint is /12345678/init.js.
In addition to responding to requests that match this configured route, the Enforcer will also proxy first party requests that match the default pattern (/12345678/init.js) and patterns according to the custom prefix (/<px_custom_first_party_prefix>/init.js) if one is configured.
px_custom_first_party_xhr_endpoint
Customizes the first party XHR endpoint. By default, for an Application ID PX12345678, the first party XHR endpoint is /12345678/xhr.
In addition to responding to requests that match this configured route, the Enforcer will also proxy first party requests that match the default pattern (/12345678/xhr/*) and patterns according to the custom prefix (/<px_custom_first_party_prefix>/xhr/*) if one is configured.
px_custom_first_party_captcha_endpoint
Customizes the first party CAPTCHA endpoint. By default, for an Application ID PX12345678, the first party CAPTCHA endpoint is /12345678/captcha.
In addition to responding to requests that match this configured route, the Enforcer will also proxy first party requests that match the default pattern (/12345678/captcha/*) and patterns according to the custom prefix (/<px_custom_first_party_prefix>/captcha/*) if one is configured.
px_custom_first_party_response_modifier
Modifies first party responses in vcl_deliver using the client response object.
Custom parameters
These configurations are related to custom parameters.
px_custom_add_custom_parameters
Enriches activities sent from the Enforcer to HUMAN with additional custom parameters. This data can include user information, session IDs, or other data that HUMAN should have access to. There is a limit of 10 custom parameters (1–10). Set them on request headers named px-custom-param:<NUMBER>. Custom parameters must also be configured in the HUMAN Portal.
Enforced routes
These configurations let you define specific routes that should be enforced by HUMAN when the Enforcer is in monitor mode. These routes will always be subject to the full Enforcer workflow, including blocking requests if necessary.
Primitive string values are treated as path prefixes. For example, /login also matches /login/callback.
px_custom_enforced_routes
A custom subroutine that lets you define which requests should be enforced based on custom logic, even when the Enforcer is in monitor mode.
- Returns
true: The request should be enforced. - Returns
false(default): The request should proceed with the usual enforcement flow.
Extracted cookies
px_custom_extracted_cookies
For each cookie name, the Enforcer will extract the cookie’s key-value pair and add it as a new field in the Risk API. This lets you include additional information to HUMAN’s detection mechanism if you’d like to.
Extract cookie values onto bereq.http.X-PX-<COOKIE_NAME> headers for HUMAN backend requests.
Filters
These configurations let you filter out certain requests or assets from the Enforcer. These values will be ignored by the Enforcer and will never be blocked.
Implement filter logic in PX_CUSTOM. A return value of true means the request is filtered from enforcement. A return value of false means the request should proceed with the usual enforcement flow.
px_custom_filter_by_extension
Filters out requests with the specified file extension. By default, HUMAN doesn’t enforce static assets such as images and documents to minimize unncessary API calls and computation, but you can configure this list at any time.
Filtering by extension only applies to GET and HEAD HTTP methods.
px_custom_filter_by_http_method
Filters out requests with the specified HTTP method to avoid unnecessary traffic in the Enforcer verification flow.
px_custom_filter_by_ip
Filters out requests with the specified IP address to avoid unnecessary traffic in the Enforcer verification flow.
The easiest way to implement this subroutine is to declare and use a Fastly Access Control List (ACL) as shown in the example below.
px_custom_filter_by_route
Filters out requests with the specified route to avoid unnecessary traffic in the Enforcer verification flow. Requests to these specified routes will never be blocked regardless of their risk score and will never generate risk or async activities. Primitive string values are treated as path prefixes. For example, /login also matches /login/callback.
px_custom_filter_by_user_agent
Filters out requests with the specified user agent to avoid unnecessary traffic in the Enforcer verification flow. Primitive string values are case-sensitive and require an exact user-agent string.
GraphQL support
These configurations let the Enforcer extract GraphQL data from requests so that it can enforce these requests in the same way as other types of traffic.
px_graphql_enabled
Whether to parse and report information about GraphQL operations on incoming requests. When true, all POST requests with routes that match the prefixes configured in px_custom_is_graphql_route will have their bodies parsed for GraphQL operations.
true: Enable GraphQL supportfalse: Disable GraphQL support
px_custom_is_graphql_route
A custom subroutine that returns whether the request should be considered a GraphQL route.
- Returns
true: HUMAN checks for sensitive GraphQL operations as specified inpx_sensitive_graphql_operation_namesandpx_sensitive_graphql_operation_types. - Returns
false(default): The Enforcer won’t attempt to extract GraphQL data.
px_sensitive_graphql_operation_names
A space-separated list of operation names that should be considered sensitive. Some routes may be more prone to bot attacks than others, such as routes that execute payments or handle personal information. You can configure these names as sensitive to ensure more stringent protection.
If one or more GraphQL operations has a name matching this list, the Enforcer will trigger a Risk API call even if the request contains a valid, unexpired cookie.
px_sensitive_graphql_operation_types
A space-separated list of operation types that should be considered sensitive. Some routes may be more prone to bot attacks than others, such as routes that execute payments or handle personal information. You can configure these routes as sensitive to ensure a more stringent protection.
If one or more GraphQL operations on an HTTP request has a type matching this list, the Enforcer will trigger a Risk API call even if the request contains a valid, unexpired cookie.
px_custom_check_sensitive_graphql_operation
This configuration is meant for cases that require more complex logic. We recommended you use px_sensitive_graphql_operation_types and px_sensitive_graphql_operation_names for most cases.
A custom subroutine that returns a boolean indicating whether the request should be treated as sensitive given the GraphQL data that was extracted by the enforcer. If it returns true, the Enforcer will trigger a Risk API call even if the request contains a valid, unexpired cookie. Extracted values are available on:
req.http.px-graphql:operation-type: The GraphQL operation type (query,mutation,subscription) on the request. Seepx_sensitive_graphql_operation_typesfor more information.req.http.px-graphql:operation-name: The GraphQL operation name on the request. Seepx_sensitive_graphql_operation_namesfor more information.
Header data enrichment
These configurations let you add headers to incoming requests with additional data.
px_data_enrichment_header_name
Adds a header to the incoming request with the configured header name and the JSON-stringified data enrichment object as the value. If empty or if data enrichment has not been enabled for your policy, no header will be set. To view available data and enable this feature, see Data classification enrichment.
HUMAN Challenge customization
These configurations let you customize the HUMAN Challenge block page.
px_css_ref
A way to include a custom CSS file to the block page.
px_js_ref
A way to include custom JavaScript to the block page. This script will run after the default JavaScript scripts.
px_custom_logo
Adds a custom logo to the HUMAN Challenge block page via URL.
px_custom_block_page_content
Returns a string containing custom HTML for the HUMAN Challenge block page. Block page template values are available on req.http.X-PX-template:*.
px_custom_web_block_page_response
Overrides the default web block response status and headers.
px_custom_rate_limit_block_page
Overrides the default rate-limit block response.
px_custom_create_advanced_blocking_response
Overrides the default Advanced Blocking Response (ABR) JSON block response status and headers.
Logging
The default installation method adds Fastly logging endpoints automatically, but if you are manually installing the Enforcer instead, see our logging endpoint setup instructions for more information.
px_async_activities_logger
Name of the logging endpoint used to send asynchronous activities.
px_telemetry_activity_logger
Name of the logging endpoint used to send telemetry activities.
px_debug_syslog_name
Name of the logging endpoint for debug logs when px_logger_severity is debug.
px_error_syslog_name
Name of the logging endpoint for error logs when px_logger_severity is error.
px_debug_probability
When logger severity is debug, one out of every N requests generates logs, where N is this value. "1" logs every request (1/1), while "100" logs about 1% of requests (1/100).
Monitored routes
px_custom_monitored_routes
A set of endpoints to be monitored rather than blocked by the Enforcer, even when the Enforcer is in active_blocking mode.
- Returns
true: The request should behave as if the Enforcer is in monitor mode, even when the module mode isactive_blocking. - Returns
false(default): The request should proceed with the usual enforcement flow.
Override configs
px_override_configs
Whenever possible, set configuration values in the px_configs table rather than adjusting them at runtime.
Adjusts HUMAN configuration based on runtime values by modifying req.http.px-cfg header fields. See the PX VCL file for available px-cfg keys.
Pre-clean
The Enforcer stores configuration and metadata on request headers during the Fastly request lifecycle. Before origin requests in vcl_miss / vcl_pass, those headers are cleaned. Use pre-clean to copy values you still need.
px_enable_pre_clean
Whether to invoke px_custom_pre_clean.
px_custom_pre_clean
Runs immediately before HUMAN metadata headers are removed from the backend request.
PXHD cookie
px_secured_pxhd_enabled
The PX Hashed Data (PXHD or _pxhd) cookie links the first risk request with the browser activities as detected by the Sensor for better user tracking. It can also add more information that’s shared between the HUMAN Collector, Enforcer, and Sensor. This configuration determines whether the Secure cookie attribute is added when setting the PXHD cookie.
See Use of cookies & web storage for more information.
true: Adds theSecureattribute to the PXHD cookiefalse: Does not add theSecureattribute to the PXHD cookie
Remote Configuration
Remote Configuration lets you update your Enforcer’s configuration from the HUMAN portal rather than interacting with the Enforcer package directly.
Remote Configuration requires access to the Fastly API and Fastly Dictionaries. These are included by default in the default installation method. If you are manually installing the Enforcer instead, see our manual installation instructions for more information.
px_logger_auth_token
An alternative to the basic logger configuration. This sends Enforcer logs to HUMAN’s logging service if a specific header is present on the request. This is particularly useful for expedited debugging, diagnosis, and resolution of any integration or Enforcer-related issues.
Contact HUMAN to recieve your token.
px_remote_config_auth_token
The token used to authenticate the Enforcer with the HUMAN Remote Configuration service.
Contact HUMAN to receive your token.
px_remote_config_id
px_fastly_api_token
Store this value in the px_private private dictionary, not in the px_configs table.
Fastly API key with permission to update the Fastly service (global scope for that service). Create a token via the Fastly Console, CLI, or API.
px_enforcer_config_rdata_id
Response custom parameters
These configurations enrich async activities with values derived from the origin response.
px_custom_add_response_custom_parameters
A subroutine that uses the origin response to set up to ten fields: custom parameters 11 through 20. These are merged into page_requested, additional_s2s, and simulated block activities. There is a limit of ten response custom parameters. Invoked in vcl_deliver after the backend response is available on resp. On Fastly VCL, set them on request headers named px-custom-param:<NUMBER>.
Risk backend overwrite
px_set_custom_risk_backend_overwrite
Changes the backend used for Risk API requests (for example, to adjust timeouts by region). Define any backends other than PX_API yourself. Called during vcl_pass when a Risk API request is needed.
Sensitive headers removal
px_custom_unset_sensitive_headers
Specifies certain headers that should not be forwarded to any other destination, including the HUMAN Detector. While HUMAN’s detection system will continue to use these headers to determine whether to block or not, the specified headers won’t be forwarded from the Enforcer, won’t appear in Enforcer activities, and won’t be sent to any other IP if the Enforcer acts as a proxy.
Called before Enforcer backend requests. Unset headers from bereq. If you do not customize this subroutine, Cookie and Cookies are removed by default.
Sensitive routes
px_custom_check_sensitive_route
A set of prefixes for all routes that should be considered sensitive.
- Returns
true: The request should always trigger a Risk API call, even with a valid cookie. - Returns
false(default): The request should proceed with the usual enforcement flow.
Users identifiers
These configurations let you extract user identifiers from a JWT carried on the request either in a cookie or a header. They’re closely related to the Accounts and Account Takeover or Fake Account features in Sightline Cyberfraud Defense.
The Enforcer reads the JWT from the configured cookie first, then from the configured header if cookie extraction does not succeed. Field names support dot notation for nested JWT claim (for example, product.id).
px_jwt_cookie_name
The name of the cookie that contains the JWT token that HUMAN should extract user identifiers from.
px_jwt_cookie_user_id_field_name
The field name in the JWT object, extracted from the JWT cookie, that contains the user ID to be extracted and reported.
px_jwt_header_name
The name of the header that contains the JWT token that HUMAN should extract user identifiers from.
px_jwt_header_user_id_field_name
The field name in the JWT object, extracted from the JWT header, that contains the user ID to be extracted and reported.
px_custom_extract_jwt_additional_fields
The field names in the JWT object that should be extracted and reported in addition to the user ID. On Fastly VCL, implement this as a subroutine that returns additional JWT fields as a string of "fieldName":"fieldValue" pairs. The decoded JWT is available on req.http.px-jwt:Token-Decoded.