Add CORS header to API

This commit is contained in:
Skylar Ittner 2019-01-07 22:18:02 -07:00
parent 7173a50c36
commit 7d30251cd6

View File

@ -10,6 +10,8 @@ require __DIR__ . '/../required.php';
require __DIR__ . '/functions.php'; require __DIR__ . '/functions.php';
require __DIR__ . '/apisettings.php'; require __DIR__ . '/apisettings.php';
header("Access-Control-Allow-Origin: *");
$VARS = $_GET; $VARS = $_GET;
if ($_SERVER['REQUEST_METHOD'] != "GET") { if ($_SERVER['REQUEST_METHOD'] != "GET") {
$VARS = array_merge($VARS, $_POST); $VARS = array_merge($VARS, $_POST);