Am trying to make an ajax call to another domain from /frontEnd/Scripts/script.js in Composite C1 but each time I add the username and password, the call omits it and fails. Is this a setting in Composite that is preventing me from doing cross domain call that require authentication?
Example:
$.ajax(
Example:
$.ajax(
{
//beforeSend: function (xhr) {
// xhr.setRequestHeader ("Authorization", "Basic " + btoa('user:password01'));
//},
url : 'https://subdomain.domain.com/bas/customers/3218348',
username: user,
password: password01,
data : {},
success:function(data, textStatus, jqXHR)
{
//data: return data from server
console.log('got back data', data);
},
error: function(jqXHR, textStatus, errorThrown)
{
//if fails
}
}); // end of ajax