From 652021d1f8530fe24aafd0ed239ebab8aaab38e0 Mon Sep 17 00:00:00 2001 From: Vladislav Studenichnik Date: Thu, 29 Jul 2021 21:51:00 +0300 Subject: [PATCH] Add Access-Control-Allow-Origin header --- core/request.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/request.php b/core/request.php index bc28d28..018c3ab 100644 --- a/core/request.php +++ b/core/request.php @@ -65,6 +65,8 @@ public static function dispatch($url = null, $routes = null, $return = false) // Route the template $request = Template::route($request); + header('Access-Control-Allow-Origin: *'); + if (!is_dir($request['template_path'])) { return Request::dispatch_notfound_template($request); }