Hi,
I am receiving CORS error whenever I call from a different domain.
I am trying to integrate a call from a website to the company creatio hosted in creatio.com.
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Access-Control-Allow-Origin", "*");
myHeaders.append("Access-Control-Allow-Methods", "*");
var raw = JSON.stringify({
"UserName": "xxxx",
"UserPassword": "xxxx"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow',
credentials: 'omit',
cache: 'no-cache',
mode: 'cors',
referrerPolicy: 'no-referrer',
};
fetch("https://xxxxxx.creatio.com/ServiceModel/AuthService.svc/Login", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
What could possibly solve this problem?
Best Regards,
Solem A