Browse Source

Add CORS header to API

master
Skylar Ittner 10 months ago
parent
commit
7d30251cd6
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      api/index.php

+ 2
- 0
api/index.php View File

@@ -10,6 +10,8 @@ require __DIR__ . '/../required.php';
require __DIR__ . '/functions.php';
require __DIR__ . '/apisettings.php';

header("Access-Control-Allow-Origin: *");

$VARS = $_GET;
if ($_SERVER['REQUEST_METHOD'] != "GET") {
$VARS = array_merge($VARS, $_POST);

Loading…
Cancel
Save