...
|
...
|
@@ -9,7 +9,6 @@ const sender = global.yoho.apmSender; |
|
|
const hostname = require('os').hostname();
|
|
|
const routeEncode = require('./route-encode');
|
|
|
const _ = require('lodash');
|
|
|
const config = global.yoho.config;
|
|
|
|
|
|
const forceNoCache = (res) => {
|
|
|
if (res) {
|
...
|
...
|
@@ -81,18 +80,6 @@ exports.serverError = () => { |
|
|
logger.error(err);
|
|
|
|
|
|
if (err && err.code === 401) {
|
|
|
|
|
|
res.clearCookie('_UID', {
|
|
|
domain: config.cookieDomain
|
|
|
});
|
|
|
res.clearCookie('_TOKEN', {
|
|
|
domain: config.cookieDomain
|
|
|
});
|
|
|
|
|
|
res.clearCookie('_SESSION_KEY', {
|
|
|
domain: config.cookieDomain
|
|
|
});
|
|
|
|
|
|
if (req.xhr) {
|
|
|
err.data = {refer: helpers.urlFormat('/signin.html', {refer: req.get('Referer') || ''})};
|
|
|
return res.json(err);
|
...
|
...
|
|