CORS errors when accessing the API

Greetings,

I'm trying to access the API from my wordpress site using PHP and AJAX. Our client has setup a TNEW site and we have a live and staging tessitura instance. Whenever I hit the API I get a CORS error.  Here's the error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at... (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 405.

I'm trying to hit the /api/Diagnostics/Status endpoint which shouldn't require any authentication.  I don't want to print the entire url for security purposes.  I'm sending this from a local instance on my machine with the same domain name as our live site.  I've been told my domain has been whitelisted.  Is there anything else I need to do to send the request?  I've also tried using an "Authorization: Basic ..." header with the hashed key following this format "admin:admin:location1:pwd123", but from my understanding I don't need that header when accessing this endpoint.

I'm using this ajax code:

$.ajax({
url: url,
headers: {
'Content-Type': 'application/json',
},
crossDomain: true,
xhrFields: {
withCredentials: true
},
}).done(function( data ) {
if ( console && console.log ) {
console.log( "Sample of data:", data.slice( 0, 100 ) );
}
});
Parents Reply Children
No Data