-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.php
33 lines (26 loc) · 865 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Liturgical Calendar API main script
* PHP version 8.3
* @author John Romano D'Orazio <[email protected]>
* @link https://litcal.johnromanodorazio.com
* @license Apache 2.0 License
* @version 3.9
* Date Created: 27 December 2017
*/
use LiturgicalCalendar\Api\Router;
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('date.timezone', 'Europe/Vatican');
require_once 'vendor/autoload.php';
/**
* Define the API_BASE_PATH constant based on the server request scheme and the server name
* !!IMPORTANT!! There are classes that depend on this !!DO NOT REMOVE!!
* Perhaps we could find a better way to set this in a class such as Core ...
*/
define('API_BASE_PATH', Router::determineBasePath());
if (false === Router::isLocalhost()) {
Router::setAllowedOrigins('allowedOrigins.php');
}
Router::route();
die();