Pull in block rules from the lighttpd config.
This commit is contained in:
parent
023e95f1bc
commit
d2c83d07d8
1 changed files with 12 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue