diff --git a/app/Filters/Cors.php b/app/Filters/Cors.php index 1a737db..8cb3e21 100644 --- a/app/Filters/Cors.php +++ b/app/Filters/Cors.php @@ -26,13 +26,13 @@ class Cors implements FilterInterface */ public function before(RequestInterface $request, $arguments = null) { - // header("Access-Control-Allow-Origin: *"); - // header("Access-Control-Allow-Headers: X-API-KEY, Origin,X-Requested-With, Content-Type, Accept, Access-Control-Requested-Method, Authorization, ClientSecret"); - // header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE"); - // $method = $_SERVER['REQUEST_METHOD']; - // if ($method == "OPTIONS") { - // die(); - // } + header("Access-Control-Allow-Origin: *"); + header("Access-Control-Allow-Headers: X-API-KEY, Origin,X-Requested-With, Content-Type, Accept, Access-Control-Requested-Method, Authorization, ClientSecret"); + header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE"); + $method = $_SERVER['REQUEST_METHOD']; + if ($method == "OPTIONS") { + die(); + } } /**