some progress
This commit is contained in:
parent
e7569b0fe9
commit
ffc57cdcf2
|
@ -1,10 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
$http_origin = $_SERVER['HTTP_ORIGIN'];
|
$http_origin = false;
|
||||||
|
if(isset($_SERVER['HTTP_ORIGIN']))
|
||||||
if ($http_origin == "https://app.hesabix.ir" || $http_origin == "http://insider.hesabix.ir")
|
$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");
|
header("Access-Control-Allow-Origin: $http_origin");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header("Access-Control-Allow-Headers: *");
|
header("Access-Control-Allow-Headers: *");
|
||||||
header("Access-Control-Allow-Methods: *");
|
header("Access-Control-Allow-Methods: *");
|
||||||
header("Allow: GET, POST, OPTIONS, PUT, DELETE");
|
header("Allow: GET, POST, OPTIONS, PUT, DELETE");
|
||||||
|
|
Loading…
Reference in a new issue