提交 03c5a9f300e2135e3a56763571739b00a1c28999

作者 fanwh
1 个父辈 6e33d9c5

no message

正在显示 1 个修改的文件 包含 3 行增加3 行删除
@@ -3,11 +3,11 @@ var IoC = require('electrolyte'); @@ -3,11 +3,11 @@ var IoC = require('electrolyte');
3 3
4 exports = module.exports = function (settings, logger) { 4 exports = module.exports = function (settings, logger) {
5 var app = this; 5 var app = this;
6 - app.use('/', function (req, res, next) { 6 + var router = express.Router();
  7 + router.get('/', function (req, res, next) {
7 res.render('index', { 'csrfToken': 'xxxx' }); 8 res.render('index', { 'csrfToken': 'xxxx' });
8 - next();  
9 }); 9 });
10 - 10 + app.use('/', router);
11 app.use(settings.proxy.signOutUrl, function (req, res, next) { 11 app.use(settings.proxy.signOutUrl, function (req, res, next) {
12 req.session.token = null; 12 req.session.token = null;
13 req.session.save(function (err) { 13 req.session.save(function (err) {
注册登录 后发表评论