]> git.openstreetmap.org Git - nominatim.git/blob - lib/init-website.php
61a417314ad1fa66ccc4a72e6e91fc43e5c0154a
[nominatim.git] / lib / init-website.php
1 <?php
2         require_once('init.php');
3         require_once('website.php');
4
5         if (CONST_NoAccessControl)
6         {
7                 header("Access-Control-Allow-Origin: *");
8                 header("Access-Control-Allow-Methods: OPTIONS,GET");
9                 if (!empty($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
10                 {
11                         header("Access-Control-Allow-Headers: ".$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']);
12                 }
13         }
14         if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') exit;
15
16         header('Content-type: text/html; charset=utf-8');
17