Add additional HTTP origins to allowed origins via WP Origin API
<?php
add_filter( 'allowed_http_origins', 'my_add_origins' );
function my_add_origins( $origins ) {
$origins[] = 'http://www.example.com'; // this will add www.example.com to the list of allowed origins when send_origin_headers() is called
return $origins;
}