From 3887469078c960437f54a71a98a6086c9706a6d3 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 10 Mar 2012 12:21:08 +0100 Subject: [PATCH] send 403 and HTML page on block --- lib/init-website.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/init-website.php b/lib/init-website.php index d21ca7af..36928628 100644 --- a/lib/init-website.php +++ b/lib/init-website.php @@ -10,9 +10,12 @@ if (strpos(CONST_BlockedIPs, ','.$_SERVER["REMOTE_ADDR"].',') !== false) { - echo "Your IP has been blocked. \n"; - echo "Please create a nominatim trac ticket (http://trac.openstreetmap.org/newticket?component=nominatim) to request this to be removed. \n"; - echo "Information on the Nominatim usage policy can be found here: http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy \n"; + header('HTTP/1.0 403 Forbidden'); + header('Content-type: text/html; charset=utf-8'); + echo "

Access blocked

"; + echo "Your IP has been blocked for overusing OpenStreetMap's volunteer-run servers.
\n"; + echo 'Please consult the Nominatim usage policy for more information.'; + echo "\n\n"; exit; } -- 2.39.5