Fix login URL regex

This commit is contained in:
An Phan 2016-07-09 13:20:27 +08:00
parent 2f0d0dc042
commit 77fa77081d
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2

View file

@ -45,7 +45,7 @@ export const http = {
NProgress.done();
if (r.status === 400 || r.status === 401) {
if (!(settings.method === 'POST' && /\/api\/me\/?/.test(settings.url))) {
if (!(settings.method === 'POST' && /\/api\/me\/?$/.test(settings.url))) {
// This is not a failed login. Log out then.
event.emit('logout');
return;