I am implementing World id document verification...
When i am running code on server there is error message as below :
VM1268:2 XMLHttpRequest cannot load Url Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 500.
$.ajax({
type: "POST",
async: false,
url: "https://api.worldidverification.com/WIDVService.svc/json/WIDV_DocumentVerification",
data: JSON.stringify(DocumentVerificationSearchRequestModel),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
if (data.Status == "false") {
alert(data.response);
}
else {
$("#tblData").show();
var trHTML = '';
var result = data.documentVerificationResponse;
for (var i = 0; i < result.length; i++) {
trHTML += '<tr><td>' + result[i].searchdisplayname + '</td><td>' + result[i].matchindicator + '</td></tr>';
}
$('#tblDatatbody').empty().append(trHTML);
}
},
error: function () {
} });
Please let me know how can i resolve this error.
Thanks