X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7c6a88295f8d33688c5a178fd5e6b317b000d91f..5864fddb537a845e0281a433f00413dde9d70a08:/lib/init-website.php diff --git a/lib/init-website.php b/lib/init-website.php index 36928628..013aee4b 100644 --- a/lib/init-website.php +++ b/lib/init-website.php @@ -1,22 +1,16 @@

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; + header("Access-Control-Allow-Origin: *"); + header("Access-Control-Allow-Methods: OPTIONS,GET"); + header("Access-Control-Max-Age: 8640000"); + if (!empty($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'])) + { + header("Access-Control-Allow-Headers: ".$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']); + } } + if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') exit; - header('Content-type: text/html; charset=utf-8'); + header('Content-type: text/html; charset=utf-8');