From 78c3a4eff2b80a18c3fa23bb2767b11867257c0e Mon Sep 17 00:00:00 2001 From: Ruben Date: Thu, 3 Nov 2016 03:40:48 +0100 Subject: [PATCH] cors fix --- www/index.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/www/index.php b/www/index.php index 628503d..41e24f1 100644 --- a/www/index.php +++ b/www/index.php @@ -21,15 +21,15 @@ if(ini_get('max_file_uploads') < 50) { throw new Exception("php directive 'max_file_uploads' should be >= 50"); } -// $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"); -// } +$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"); +} /* * JWT setup