Filter by Route

Deprecated

In case you don’t want to enforce your entire website topology, you can filter out specific routes using the Filter by Route feature.

TO define filtered routes:

  1. Open the PX_CUSTOM.vcl fie.
  2. Add the required routes as a regex expression using req.url.path.

EXAMPLE

1sub px_custom_filter_by_route {
2 if (req.url.path ~ {"^/prefix|^/exact/match$"}) {
3 set req.http.X-PX-filter-by:route = "1";
4 }
5}

To learn more about custom subroutines, see Customized subroutines.

TO enable the feature:

v8.0.0 and up

  1. Open the PX_CONFIG.vcl file.
  2. Set the px_filter_by_route_enabled value to “true” (enabled). The default is “false” (disabled).
1table px_configs {
2 "px_filter_by_route_enabled": "true",
3}

v7.2.0 and below

  1. Open the PX_CONFIG.vcl file.
  2. Set the ENABLE_WHITELISTED_ROUTES value to “1” (enabled). The default is “0” (disabled).
1table px_configs {
2 "ENABLE_WHITELISTED_ROUTES": "1",
3}
Test
  1. Send a request to one of the defined routes.
  2. Openthe console and search for your request. If you can’t find the request, the feature is configured correctly.