<?php

if($_SERVER['REQUEST_METHOD'] == 'OPTIONS'){
	header("Access-Control-Allow-Origin: *");
	header("Access-Control-Allow-Headers: Content-Type,Access-Token,Appid,Secret,Authorization,x-access-token,x-user-id,authToken,device");
	return 1;
}

define("IA_ROOT", '');
error_reporting(E_ALL);
// date_default_timezone_set('PRC');
date_default_timezone_set('Europe/London');

header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: Content-Type,Access-Token,Appid,Secret,Authorization,x-access-token,x-user-id,authToken,device");


// if($_SERVER['REQUEST_URI'] == '/api/v1/lottery/get-baoma-result'){
//     return 'x';
// }


defined('DOMAIN') or define('DOMAIN', $_SERVER["HTTP_HOST"]);
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('ROOT_PATH') or define('ROOT_PATH', __DIR__);


require(__DIR__ . '/../vendor/autoload.php');

$config = require __DIR__ . '/../config/web.php';

// $application = new app\core\Application($config);


$application = new app\core\WebApplication($config);

$application->run();

