What you can configure
- Answer only your own host names, and refuse admin modules behind every URI siteaccess: host, replace [EXP-MODULES].
- Make the search, downloads and PDFs cost a bot more than a person: a budget per area with limit ... at and match, or challenge.
- Check the login more often and limit registrations: replace [EXP-LOGIN], limit registrations.
- Take forms of your own extensions, a REST API with PUT, PATCH and DELETE, or webhooks: allow, method, post-origin except, challenge-exempt.
- Open the administration only to the office or the VPN: restrict /admin/** to ..., exempt.
- Let monitors, partners and your own scripts through: exempt ... until, expRequestShield::selfHeader().
- Run behind Cloudflare, a load balancer, nginx or LiteSpeed: trust, set secret, set store file.
- Watch a rule before it refuses anybody: set mode monitor, monitor <rule>.
- Ban scanners, keep addresses out, welcome or block crawlers: ban, deny, feed, crawlers.
- Show your own texts and error pages: set text.<lang>.<key>, set error-page.
- Prove every rule before it is live: expect lines, bin/request-shield test, trace, replay.
A short example
In settings/request-shield/request-shield.rules:
ids SITE
include exponential-admin-uri.rules
set mode enforce
host www.example.org example.org
match /content/download/** {
[SITE-DOWNLOADS] limit downloads 30/min on-exceeded challenge
expect GET /content/download/12/34/file/report.zip times 30 answered
expect GET /content/download/12/34/file/report.zip times 31 check
}
[SITE-HOOK-POST] allow POST /webhook/**
[SITE-HOOK-ORIGIN] post-origin except /webhook/**
[SITE-HOOK-NOCHECK] challenge-exempt /webhook/**
expect POST /webhook/payments answered
Downloads get 30 a minute per visitor, then the browser check; a payment provider may post to /webhook/ from its own servers. The expect lines are tests: bin/request-shield test decides each one, so the file cannot promise what the rules do not do.
The full reference
- Reference: every setting, every rule line and set key with its default, the order of the checks, every shipped rule by ID.
- Cookbook: recipes to copy for the search, downloads, login, forms, REST API, admin, webhooks, Cloudflare, nginx, LiteSpeed and shared hosting.
- Configuration reference and Troubleshooting in the Exponential documentation.