wordpress web config allow cross origin code example
Example 1: wordpress Access-Control-Allow-Origin
function add_cors_http_header(){
header("Access-Control-Allow-Origin: *");
}
add_action('init','add_cors_http_header');
Example 2: wordpress allow cross domain
function add_cors_http_header(){
header("Access-Control-Allow-Origin: *");
}
add_action('init','add_cors_http_header');