update cors

This commit is contained in:
Naden
2026-04-25 05:58:21 +07:00
parent 0469f2d343
commit 211f72fa3b

View File

@@ -26,13 +26,13 @@ class Cors implements FilterInterface
*/ */
public function before(RequestInterface $request, $arguments = null) public function before(RequestInterface $request, $arguments = null)
{ {
// header("Access-Control-Allow-Origin: *"); 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-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"); header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
// $method = $_SERVER['REQUEST_METHOD']; $method = $_SERVER['REQUEST_METHOD'];
// if ($method == "OPTIONS") { if ($method == "OPTIONS") {
// die(); die();
// } }
} }
/** /**