Backend Service
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user