Pesquisar no apoio

Evite burlas no apoio. Nunca iremos solicitar que telefone ou envie uma mensagem de texto para um número de telefone ou que partilhe informações pessoais. Por favor, reporte atividades suspeitas utilizando a opção "Reportar abuso".

Learn More

status code for a request showing 502 when connection failed

  • Nenhuma resposta
  • 1 tem este problema
  • 12 visualizações
more options

an XMLhttpRequest connection failed or blocked due to Cross-Origin Request Blocked: (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). the status code from request object is zero (0). when tried like this


XMLHttpRequest.prototype.open = (function(open) {

return function(method, url, async, user, password) {
 this.onload = function() {
  console.log(this.status);
 };
 open.apply(this, arguments);
};

})(XMLHttpRequest.prototype.open);


but how come in network tab its showing 502.

an XMLhttpRequest connection failed or blocked due to Cross-Origin Request Blocked: (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). the status code from request object is zero (0). when tried like this XMLHttpRequest.prototype.open = (function(open) { return function(method, url, async, user, password) { this.onload = function() { console.log(this.status); }; open.apply(this, arguments); }; })(XMLHttpRequest.prototype.open); but how come in network tab its showing 502.

Modificado por spunky838 a