http-bot-verifier #
NGINX module that validates incoming traffic claiming to be search-engine crawlers (Googlebot, Bingbot, …) by reverse-DNS lookup.
Source: upstream source
Directives
bot_verifier #
syntax: bot_verifier 1 arg (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
bot_verifier_enable_repsheet #
syntax: bot_verifier_enable_repsheet 1 arg (on/off flag); · context: http, server, location
Boolean directive — set to "on" or "off".
bot_verifier_redis_connection_timeout #
syntax: bot_verifier_redis_connection_timeout 1 arg (integer); · context: http, server, location
This setting is used to connect to the Redis database used for caching lookup results. Back to TOC bot_verifier_redis_connection_timeout ------------------------------------- syntax: bot_verifier_redis_connection_timeout <int> default: 10 context: location phase: access Sets the timeout when connecting to Redis.
bot_verifier_redis_expiry #
syntax: bot_verifier_redis_expiry 1 arg (integer); · context: http, server, location
This setting is used to connect to the Redis database used for caching lookup results. Back to TOC bot_verifier_redis_expiry ------------------------- syntax: bot_verifier_redis_expiry <seconds> default: 3600 context: location phase: access Sets the timeout when querying Redis.
bot_verifier_redis_host #
syntax: bot_verifier_redis_host 1 arg (string); · context: http, server, location
The module will not act unless it is set to on. Back to TOC bot_verifier_redis_host ----------------------- syntax: bot_verifier_redis_host <string> default: localhost context: location phase: access Sets the Redis host.
bot_verifier_redis_port #
syntax: bot_verifier_redis_port 1 arg (integer); · context: http, server, location
This setting is used to connect to the Redis database used for caching lookup results. Back to TOC bot_verifier_redis_port ----------------------- syntax: bot_verifier_redis_port <int> default: 6379 context: location phase: access Sets the Redis port.
bot_verifier_redis_read_timeout #
syntax: bot_verifier_redis_read_timeout 1 arg (integer); · context: http, server, location
This setting is used to connect to the Redis database used for caching lookup results. Back to TOC bot_verifier_redis_read_timeout ------------------------------------- syntax: bot_verifier_redis_read_timeout <int> default: 10 context: location phase: access Sets the timeout when querying Redis.
Example
events {
worker_connections 1024;
}
http {
server {
bot_verifier_redis_host localhost;
bot_verifier_redis_port 6379;
bot_verifier_redis_connection_timeout 10;
bot_verifier_redis_read_timeout 10;
bot_verifier_redis_expiry 3600;
bot_verifier_enable_repsheet on;
listen 8888;
location / {
bot_verifier on;
}
}
}