내 웹 사이트에서 도메인 간 대화에 CORS를 사용하고 있습니다. 그림에 표시된대로 응답 헤더가 나에게 잘 보이지만 아직 응답이 없습니다. 그것도 여전히 비어 있거나 응답과 함께 반환됩니다. 누구나 내 접근 방식에서 오류를 예측하여 첨부 된 이미지를 볼 수 있습니까? 반드시CORS 구현 중에 응답이 없습니다.
function getXMLHTTPRequest() {
try {
req = new XMLHttpRequest();
} catch(err1) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch (err2) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch (err3) {
req = false;
}
}
}
return req;
}
var http899 = getXMLHTTPRequest();
http899.open("GET", modurl, true);
http899.setRequestHeader('Content-Type', 'text/html');
http899.onreadystatechange = useHttpResponse899;
http899.send(null);
만료 시간을 확인하십시오. 이것이 1981 년의 문제 일 수 있습니까? –
비슷한 문제가 여기에 있습니다 : http://serverfault.com/questions/446152/litespeed-enable-access-control-allow-origin-no-response-header-on-cors-request –
@JoeCoderGuy 내 문제를 해결 한 후, 나는 이것을 썼다. http://stackoverflow.com/questions/11964178/implementing-cross-domain-communication-between-sites-through-cors-using-php-and/11964339#11964339 –