Pull in block rules from the lighttpd config.

This commit is contained in:
Tom Hughes 2009-04-20 21:14:39 +00:00
parent 023e95f1bc
commit d2c83d07d8

View file

@ -136,8 +136,19 @@ http {
}
# Placeholder for blocking abuse
include /etc/nginx/blocked_hosts;
allow all;
# Block some bulk download agents
if ($http_user_agent ~* LWP::Simple|downloadosm|BBBike) {
return 403;
}
# Block some robots
if ($http_user_agent ~* msnbot|twiceler) {
return 403;
}
# Map api.openstreetmap/0.n/... to api.openstreetmap/api/0.n/...
if ($host ~* ^api\.) {
rewrite ^/(0\.[0-9]+)/(.*)$ /api/$1/$2;