WordPress has the action send_headers
, which you can use to make it send additional headers:
add_action( 'send_headers', 'add_header_acao' );
function add_header_acao() {
header( 'Access-Control-Allow-Origin: *' );
}
See the documentation http://codex.wordpress.org/Plugin_API/Action_Reference/send_headers