setwafBypass — Temporarily disabling the Firewall & CDN

If it’s necessary to temporarily disable the Acceleration and Prevention features of the Firewall & CDN, it’s possible to place the site into "bypass" mode, where all requests are forwarded directly to the origin server. As a rule, when the bypass is on, the Firewall & CDN is off, and vice-versa.

The Firewall & CDN Bypass functions only on the www host CNAME alias configured for the protected site.

After DNS configuration, the Firewall & CDN CNAME alias points to the standard www hostname (for example, www.example.com). In bypass mode, inbound web traffic directed to this host name will bypass the Firewall & CDN and go directly to the origin site. Traffic directed to the naked domain (for example, example.com) will not bypass the Firewall & CDN due to the static nature of the A records (IP addresses) used in the DNS zone configuration.

If the site redirects requests for the www host to the naked domain (for example, www.example.com ⇒ example.com), the incoming redirected traffic will not bypass the Firewall & CDN.

Using the setWafBypass request, you can enable or disable the Firewall & CDN bypass state.

  • When bypass is off

    • and use_true_shield is 0, Firewall & CDN protection is turned off.

    • and use_true_speed is 0, CDN caching is turned off.

  • When bypass is 'on'

    • all requests are simply forwarded to the origin server, and use_true_shield and use_true_speed have no effect.

The API endpoint is:

https://api.sitelock.com/v1/partner

Request format

  • SiteLockOnlineRequest: This element is used to delineate the full API request.

    • authentication: The partner’s username, password, and branding.

      • username: The partner’s API username

      • password: The partner’s API password

    • setWafBypass: The method name

      • site_id: The ID of the site for which the bypass is to be modified

      • bypass: The bypass status: either off or on

      • use_true_shield: The Firewall & CDN protection status. The possible values are 1 (enabled) and 0 (disabled)

      • use_true_speed: The CDN caching status. The possible values are 1 (enabled) and 0 (disabled)

Example request

<SiteLockOnlineRequest>
    <authentication>
        <user>Username</user>
        <password>Password</password>
    </authentication>
    <setWafBypass>
        <site_id>1234567</site_id>
        <bypass>on</bypass>
        <use_true_shield>0</use_true_shield>
        <use_true_speed>1</use_true_speed>
    </setWafBypass>
</SiteLockOnlineRequest>

Response format

  • SiteLockOnlineResponse: This element is used to delineate the full API response.

    • getWafBypass: The method name

      • bypass_status: The bypass status: either off or on

      • status: Either ok or error

Example response

<SiteLockOnlineResponse>
    <setWafBypass>
        <bypass_status>on</bypass_status>
        <status>ok</status>
    </setWafBypass>
</SiteLockOnlineResponse>