(js) Fix detection of session expiration
This commit is contained in:
parent
c9467e1ce3
commit
d2b94eba09
3
NEWS
3
NEWS
|
@ -1,4 +1,4 @@
|
||||||
3.2.4 (2016-12-DD)
|
3.2.4 (2016-12-01)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
New features
|
New features
|
||||||
|
@ -12,6 +12,7 @@ Bug fixes
|
||||||
- [web] fixed JavaScript exception when SOGo is launched from an external link (#3900)
|
- [web] fixed JavaScript exception when SOGo is launched from an external link (#3900)
|
||||||
- [web] restored fetching of freebusy information of MS Exchange contacts
|
- [web] restored fetching of freebusy information of MS Exchange contacts
|
||||||
- [web] fixed mail attribute when importing an LDIF file (#3878)
|
- [web] fixed mail attribute when importing an LDIF file (#3878)
|
||||||
|
- [web] fixed detection of session expiration
|
||||||
- [eas] properly escape all GAL responses (#3923)
|
- [eas] properly escape all GAL responses (#3923)
|
||||||
|
|
||||||
3.2.3 (2016-11-25)
|
3.2.3 (2016-11-25)
|
||||||
|
|
|
@ -243,7 +243,7 @@
|
||||||
response: function(response) {
|
response: function(response) {
|
||||||
// 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) &&
|
||||||
/^<!DOCTYPE html>/.test(response.data)) {
|
/^[\n\r ]*<!DOCTYPE html>/.test(response.data)) {
|
||||||
$window.location.reload(true);
|
$window.location.reload(true);
|
||||||
return $q.reject();
|
return $q.reject();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue