This commit is contained in:
Ruben 2016-11-03 03:36:26 +01:00
parent 93ddb4a216
commit a070677dd9
1 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,12 @@ if(ini_get('max_file_uploads') < 50) {
throw new Exception("php directive 'max_file_uploads' should be >= 50");
}
header("Access-Control-Allow-Origin: https://emotionhero.com");
$http_origin = $_SERVER['HTTP_ORIGIN'];
if ($http_origin == "https://emotionhero.com" || $http_origin == "http://emotionhero.com")
{
header("Access-Control-Allow-Origin: $http_origin");
}
// header("Access-Control-Allow-Origin: https://emotionhero.com");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
header("Access-Control-Allow-Headers: X-PINGOTHER");
header("Access-Control-Max-Age: 1728000");