The following code snippet updates the header information for each request.
var open: any = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function () {
open.apply(this, [].slice.call(arguments));
this.setRequestHeader('Authorization', `Bearer ${token}`);
};
As a result, it merges the header token with the previous request token.
How can I prevent tokens from merging in the header? In fact, the new token will be overwritten.


