(js) Improve CAS handling

pull/259/head
Francis Lachapelle 2019-09-26 11:08:14 -04:00
parent 0de722d8f4
commit ac9fa92d4f
1 changed files with 1 additions and 0 deletions

View File

@ -303,6 +303,7 @@
// When expecting JSON but receiving HTML, assume session has expired and reload page
if (response && /^application\/json/.test(response.config.headers.Accept) &&
/^[\n\r ]*<!DOCTYPE html/.test(response.data)) {
angular.element($window).off('beforeunload');
$window.location.href = $window.ApplicationBaseURL;
return $q.reject();
}