Skip to content

Commit

Permalink
(js) Improve CAS handling
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Sep 26, 2019
1 parent 0de722d commit ac9fa92
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions UI/WebServerResources/js/Common/Common.app.js
Expand Up @@ -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();
}
Expand Down

0 comments on commit ac9fa92

Please sign in to comment.