Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

status code for a request showing 502 when connection failed

  • No replies
  • 1 has this problem
  • 12 views
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.

Modified by spunky838