Regular expressions to match the User-Agent request header; requests matching will be allowed to access.
deny
array of string
Optional
-
Regular expressions to match the User-Agent request header; requests matching will be blocked.
blocked_code
number
Optional
403
HTTP status code returned when a request is blocked.
blocked_message
string
Optional
-
HTTP response body returned when a request is blocked.
The allow and deny fields can both be left unconfigured, in which case the default crawler identification logic will be executed. Configuring the allow field can allow requests that would otherwise hit the default crawler identification logic. Configuring the deny field can add additional crawler identification logic.
The default crawler identification regular expression set is as follows:
Configuration Example
Allowing Requests That Hit the Crawler Rules
If this configuration is not made, requests from the default Golang network library will be treated as crawlers and blocked.
Adding Crawler Identification
With this configuration, the following requests will be blocked: