code: function getResponseUrl(xhr) {
      if ('responseURL' in xhr && xhr.responseURL) {
          return xhr.responseURL;
      }
      if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
          return xhr.getResponseHeader('X-Request-URL');
      }
      return null;
  }
docs: Determine an appropriate URL for the response, by checking either
  XMLHttpRequest.responseURL or the X-Request-URL header.