В запрошенном ресурсе нет заголовка «Access-Control-Allow-Origin». Поэтому исходный адрес https://sx.xyz.com 'не разрешен.
Я столкнулся с аналогичной проблемой с Exchange Domain Exchange в ответе Ajax как ошибка не определено. Но ответ в заголовке был кодом состояния: 200 OK
Failed to load https://www.Domain.in/index.php?route=api/synchronization/checkapikey:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://sx.xyz.in' is therefore not allowed access.
Решение для его обхода: в моем случае это было вызов функции checkapikey () через Ajax в другой домен и получение ответа с данные, на которые был сделан вызов:
if (($this->request->server['REQUEST_METHOD'] == 'POST') && isset($this->request->server['HTTP_ORIGIN'])) {
$this->response->addHeader('Access-Control-Allow-Origin: ' . $this->request->server['HTTP_ORIGIN']);
$this->response->addHeader('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');
$this->response->addHeader('Access-Control-Max-Age: 1000');
$this->response->addHeader('Access-Control-Allow-Credentials: true');
$this->response->addHeader('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With');
$headers = getallheaders();
...
}