![]() |
CORS diference between 4.0.4 and 4.1.18 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: CORS diference between 4.0.4 and 4.1.18 (/showthread.php?tid=81150) |
CORS diference between 4.0.4 and 4.1.18 - aparedesv - 01-28-2022 Hi, I have a cors filter in production API developed with the version 4.0.4 and works perfect; now, I clone the same repo in local envirorment and run composer install (with 4.1.18 CI version) and cors filter doesn't work! my cors filters is: header('Access-Control-Allow-Origin: *'); header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Authorization, Accept, Access-Control-Request-Method"); header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE"); header("Allow: GET, POST, OPTIONS, PUT, DELETE"); $method = $_SERVER['REQUEST_METHOD']; if($method == "OPTIONS") { die(); } any idea? thank's! |