Use top url on redirections
This commit is contained in:
parent
5decea40d8
commit
a3f61ccebd
@ -203,8 +203,9 @@
|
|||||||
// data / status / config / statusText / headers()
|
// data / status / config / statusText / headers()
|
||||||
var url = rejection.headers();
|
var url = rejection.headers();
|
||||||
if (rejection.status == 401 && url.authorization && url.authorization.match(/^http/)) {
|
if (rejection.status == 401 && url.authorization && url.authorization.match(/^http/)) {
|
||||||
/* TODO: replace this with a popup */
|
var u = url.authorization.replace(/url=.*$/g, '');
|
||||||
window.location = url.authorization;
|
u += 'url=' + window.btoa(window.location).replace(/\//, '_');
|
||||||
|
window.location = u;
|
||||||
} else {
|
} else {
|
||||||
alert(rejection.statusText ? rejection.statusText : 'Network problem');
|
alert(rejection.statusText ? rejection.statusText : 'Network problem');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user