Backend Service

This commit is contained in:
2019-03-11 02:33:01 +00:00
parent 718c006882
commit 384521a281
+13
View File
@@ -5,6 +5,19 @@ THIS IS THE USER ENTRY POINT API
require '../../backend.php';
require '../backend_defines.php';
//var_dump($mermsemr->cfgReadChar("database.host"));
if ($_SERVER['REQUEST_METHOD']=='OPTIONS') {
$headers = getallheaders();
header('Access-Control-Allow-Origin: '.(isset($headers["Origin"])?$headers["Origin"]:'*'));
header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS');
header('Access-Control-Allow-Headers: access-control-allow-methods,access-control-allow-origin,content-type');
//header('Access-Control-Max-Age: 1728000');
header('Content-Length: 0');
header('Content-Type: text/plain');
die();
}
header('Access-Control-Allow-Headers: access-control-allow-methods,access-control-allow-origin,content-type');
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
$endpoints = array(
'createuser' => array('POST'),