Skip to main content

Cloudflare Integration

IntelliFend seamlessly integrates with the Cloudflare CDN through the Interceptor integration mode, leveraging the Cloudflare Worker function. We use the Cloudflare worker to intercept the request log and determine whether to monitor, block, or challenge traffic with Captcha.

The following procedure describes the high-level steps for setting up Cloudflare Integration:

  1. Create an Account API token in Cloudflare.
  2. Configure integration in IntelliFend Back Office.

Step 1: Create an Account API token in Cloudflare

To allow IntelliFend to deploy the worker.js script in Cloudflare Workers, you must create an Account API token in Cloudflare. Follow these steps to generate the required API token.

  1. Log in to the Cloudflare dashboard, select the account you want to use, then go to Manage Account > Account API Tokens.
  2. Click the Create Token button.
  3. Specify a descriptive token name.
  4. In Permission policies, keep Custom selected and create the permissions below. Cloudflare's editor uses Edit for full access; the review screen may display the same access level as Write.
PolicyResource selectorPermission sectionNameAccess
1Entire AccountDeveloper PlatformWorkers ScriptsEdit
2All DomainsDeveloper PlatformWorkers RoutesEdit
2All DomainsDNS & ZonesDNSRead
2All DomainsDNS & ZonesZoneRead

Cloudflare API token

Use All Domains if IntelliFend should manage every zone in the selected account, or limit the second policy to only the domains that should use IntelliFend. Account-owned tokens are automatically scoped to the selected account.

  1. Click the Continue to summary button.
  2. Review the token summary.
  3. Click the Create Token button to generate the API token.

Cloudflare API token

  1. Copy the generated token for later configuration in the IntelliFend Back Office.

Cloudflare API token

Step 2: Configure integration in IntelliFend Back Office

To create the integration between your applications and IntelliFend, follow the below steps:

  1. Go to the IntelliFend Back Office page, and click Integration in the left navigation pane.
  2. Click on the application name that you want to integrate. Please make sure that its integration mode is Interceptor.
note

If you do not have the desired application, you can contact us to create one for you.

  1. Select the Cloudflare CDN, input the Cloudflare API token you created in Step 1: Create an API token in Cloudflare, and click the Connect button.
  2. Provide your information in the integration form.
    • API: Turn on the toggle if your application is served for API requests only. You need to provide the parameter name of the API key () to generate the visitor ID for the API request.
    • Block setting: Switch the toggle on to redirect blocked visitors to your designated URL. Switch it off to keep blocked visitors on the IntelliFend default blocking page.
    • Domains: Select the domains that you want its traffic to be intercepted by IntelliFend. The dropdown list shows all domains that belong to the Access Key.
  3. Review the information and click the Save button
info

To prevent your health check traffic from being flagged as bot activity. After successfully configuring the integration, you can append the Stealth ID parameter '_intellifend'—available on the Integration Details page—to your health check URL. Example: https://yoursite.com/?_intellifend=stealth_id