For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HUMAN DashboardHUMAN WebsiteRequest a Demo
Product GuidesEnforcer GuidesMobile SDKAPI ReferenceCustomer support
Product GuidesEnforcer GuidesMobile SDKAPI ReferenceCustomer support
  • General
    • About Enforcers
    • Support first-party HUMAN calls
    • Troubleshoot Enforcer configurations
  • Enforcer frameworks
    • Akamai ESI
    • Apache - C Module
    • ASP.NET
    • Callout Enforcer
    • Envoy Proxy
    • F5 BIGIP
    • Fastly JavaScript Compute@Edge
      • Fastly VCL changelog
        • Installing the Enforcer
        • GraphQL Support
        • Sensitive GraphQL Operations
        • Basic Configuration
        • Customized Subroutines
        • Additional Activity Handler
        • Advanced Blocking Response
        • Creating and Configuring the Edge-Dictionary
        • Custom CSS
        • Custom First Party Sensor Endpoint
        • Custom Logo
        • Custom JS Script
        • Custom Parameters
        • Filter Requests
        • Filter by HTTP Method
        • Filter by Route
        • Filter by Extension
        • Filter by IP
        • Filter by User Agent
        • Data Enrichment
        • First Party
        • First Party Snippet
        • Enforced Routes
        • Login Credentials Extraction
        • Modify First Party Response
        • Module Context Object
        • Module Enabled
        • Module Mode
        • Monitored Routes
        • Returning A Custom Block Page
        • Sensitive Routes
        • Test Block Flow on Monitoring Mode - Bypass Monitor Header
        • Upgrading the Enforcer
    • Google Cloud Platform (GCP) Callout Enforcer
    • Kong Plugin
    • NGINX - C Module
    • NGINX - LUA Module
    • PHP
    • Python
    • Ruby
    • Salesforce Commerce Cloud Cartridge
LogoLogo
Login
Login
HUMAN DashboardHUMAN WebsiteRequest a Demo
Enforcer frameworksFastly VCLV9 and Below

Filter by IP

Was this page helpful?
Previous

Filter by User Agent

Next
Built with

If you want to run internal tests from your office/site IP addresses, you can filter out requests originating from a specific IP address.

TO define an IP address you want to filter:

  1. Open the PX_CUSTOM.vcl fie.
  2. Add the required IP as a regex expression using req.http.Fastly-Client-IP.

EXAMPLE

1sub px_custom_filter_by_ip {
2 if (req.http.Fastly-Client-IP ~ {"<filterd_ip_address_regex>"}) {
3 set req.http.X-PX-filter-by:ip = "1";
4 }
5}

To learn more about custom subroutines, see Customized subroutines.

TO enable the feature:

  1. Open the PX_CONFIG.vcl file.
  2. Set the px_filter_by_ip_enabled value to “true” (enabled). The default is “false” (disabled).
1table px_configs {
2 "px_filter_by_ip_enabled": "true",
3}
Test
  1. Send a request that includes the filtered IP.
  2. Openthe console and search for your request. If you can’t find the request, the feature is configured correctly.