Cors Header ‘access Control Allow Origin’ Missing IN PARTICULAR CAKEPHP

[Solved] Cors Header ‘access Control Allow Origin’ Missing IN PARTICULAR CAKEPHP | Php Frameworks Cakephp - Code Explorer | yomemimo.com
Question : cors header ‘access-control-allow-origin’ missing IN PARTICULAR CAKEPHP API

Answered by : faithful-ferret-wliylyaxl77o

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, PUT, PATCH, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: *');
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { exit(0);
}

Source : https://gist.github.com/yashuarc/10080747 | Last Update : Fri, 21 Aug 20

Answers related to cors header ‘access control allow origin’ missing IN PARTICULAR CAKEPHP API

Code Explorer Popular Question For Php Frameworks Cakephp