Сервер внезапно перестал отвечать на кроссдоменные запросы (может обновление ПО на хостинге)
клиент (js):
Request.onload = answer;
Request.open("post", "https://xxx.php", false);
Request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");
Request.send(forSend);
сервер (php):
header('Content-Type: application/json');
header('X-Content-Type-Options nosniff');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST');
header('Access-Control-Allow-Headers: Content-Type');
header('Access-Control-Allow-Credentials: true');
в итоге в консоли:
Failed to load https://xxx.php: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Uncaught DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://xxx.php'.
подскажите как разрешить запросы или в чем еще может быть проблема?
Request.send(forSend);
. Может там не толькоAccess-Control-Allow-Origin
нет, но и всех остальных.