hesabixCore/public_html/index.php

23 lines
759 B
PHP
Raw Normal View History

2023-01-17 10:33:36 +03:30
<?php
2023-11-05 22:14:36 +03:30
$http_origin = false;
if(isset($_SERVER['HTTP_ORIGIN']))
$http_origin = $_SERVER['HTTP_ORIGIN'];
elseif(isset($_SERVER['HTTP_ORIGIN']))
$http_origin = $_SERVER['HTTP_REFERER'];
if($http_origin){
if ($http_origin == "https://app.hesabix.ir" || $http_origin == "http://insider.hesabix.ir" || $http_origin == "http://localhost")
{
header("Access-Control-Allow-Origin: $http_origin");
}
}
2023-11-05 22:14:36 +03:30
header("Access-Control-Allow-Headers: *");
header("Access-Control-Allow-Methods: *");
header("Allow: GET, POST, OPTIONS, PUT, DELETE");
2023-01-17 10:33:36 +03:30
use App\Kernel;
2023-09-21 23:04:08 +03:30
require_once dirname(__DIR__).'/hesabixCore/vendor/autoload_runtime.php';
2023-01-17 10:33:36 +03:30
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};