mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
moved one of the middlewares before app.use(app.router)
This commit is contained in:
@@ -59,8 +59,6 @@ var express = require('express'),
|
||||
|
||||
auth.initialize(app);
|
||||
|
||||
app.use(app.router);
|
||||
|
||||
app.use(function(req, res, next) {
|
||||
// Don't bother with session handling for API requests
|
||||
if (/^\/api\//.test(req.url)) return next();
|
||||
@@ -74,6 +72,8 @@ var express = require('express'),
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
app.use(app.router);
|
||||
|
||||
app.use(function(req, res, next) {
|
||||
res.status(404);
|
||||
|
||||
Reference in New Issue
Block a user