(js) Improve CAS handling
parent
0de722d8f4
commit
ac9fa92d4f
|
@ -303,6 +303,7 @@
|
||||||
// When expecting JSON but receiving HTML, assume session has expired and reload page
|
// When expecting JSON but receiving HTML, assume session has expired and reload page
|
||||||
if (response && /^application\/json/.test(response.config.headers.Accept) &&
|
if (response && /^application\/json/.test(response.config.headers.Accept) &&
|
||||||
/^[\n\r ]*<!DOCTYPE html/.test(response.data)) {
|
/^[\n\r ]*<!DOCTYPE html/.test(response.data)) {
|
||||||
|
angular.element($window).off('beforeunload');
|
||||||
$window.location.href = $window.ApplicationBaseURL;
|
$window.location.href = $window.ApplicationBaseURL;
|
||||||
return $q.reject();
|
return $q.reject();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue