Skip to content

Commit 2bade50

Browse files
Router update for API
1 parent 1f54b3b commit 2bade50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/functions/router.script.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ private static function api_route($path)
4646
{
4747
$routes = API_ROUTES[REQUEST['method']];
4848
if (array_key_exists($path, $routes)) {
49+
header("Access-Control-Allow-Origin: *");
4950
header("Content-Type: application/json");
5051
require API_VIEW . $routes[$path][0];
5152
} else require APP_ERROR_PAGES . API_ROUTES['err']['404'];

0 commit comments

Comments
 (0)