正在显示
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) { |
请
注册
或
登录
后发表评论