mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-23 13:59:32 +00:00
(js) Fix detection of session expiration
This commit is contained in:
@@ -243,7 +243,7 @@
|
||||
response: function(response) {
|
||||
// When expecting JSON but receiving HTML, assume session has expired and reload page
|
||||
if (response && /^application\/json/.test(response.config.headers.Accept) &&
|
||||
/^<!DOCTYPE html>/.test(response.data)) {
|
||||
/^[\n\r ]*<!DOCTYPE html>/.test(response.data)) {
|
||||
$window.location.reload(true);
|
||||
return $q.reject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user