I'm using a third-party embedded code that makes some HTTP request with request header origin different from mine.
When I try to intercept the HTTP requests with XMLHttpRequest, it doesn't intercept that request. I am assuming it is because it has a different origin. However, the chrome-dev-tools does intercept it.
let oldXHROpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(method, url) {
console.log(url)
return oldXHROpen.apply(this, arguments);
}
It logs all the requests that have the request header origin as my domain. However, It doesn't log any requests that are shown in the dev-tools with a request header origin other than my domain.