Cloudflare
A custom rule with the Skip action. About five minutes, with access to the site's security rules.
- In the Cloudflare dashboard, choose your site, then open Security rules.
- Select Create rule, then Custom rules.
- Name it "Allow SiteGauge".
- Switch to the expression editor and enter the expression below.
- Under Then take action, choose Skip.
- In the skip options, tick All remaining custom rules, All Super Bot Fight Mode rules (Pro, Business and Enterprise plans) and Browser Integrity Check. Rate limiting rules are optional. Leave managed rules unticked so SiteGauge requests still get your attack protection.
- Leave Log matching requests on, so you can see the rule working in Security Events.
- Deploy, then move the rule to the top of the list. Rules run in order, so it must come before any rule that challenges or blocks.
any(http.request.headers["x-sitegauge-key"][*] == "YOUR_KEY")
To limit the rule to one hostname, add and http.host eq "www.example.com" to the end of the expression.
What this skips
- Your other custom rules (including any Managed Challenge rules), Super Bot Fight Mode and Browser Integrity Check, plus rate limiting if you ticked it.
- If you use Bot Management (Enterprise), your bot score rules are custom rules, so skipping the remaining custom rules skips the actions they would take. Check Security Events after a test to confirm.
- Bot Fight Mode on the Free plan cannot be skipped. Cloudflare states that custom rules cannot skip it.
On the Free plan
Cloudflare's free Bot Fight Mode ignores Skip rules, so the key cannot get past it. You can turn Bot Fight Mode off (Security Settings, filter by Bot traffic, then switch Bot Fight Mode off), which applies to all visitors, or move to Pro, where Super Bot Fight Mode honours Skip rules.
Custom rules per site: 5 on Free, 20 on Pro, 100 on Business and 1,000 on Enterprise.
We could not confirm that a Skip rule gets past Under Attack Mode. If you use it, check Cloudflare's current docs.