fixed body parser warning
This commit is contained in:
4
app.js
4
app.js
@ -76,7 +76,7 @@ app.use(connectAssets({
|
|||||||
}));
|
}));
|
||||||
app.use(logger('dev'));
|
app.use(logger('dev'));
|
||||||
app.use(bodyParser.json());
|
app.use(bodyParser.json());
|
||||||
app.use(bodyParser.urlencoded());
|
app.use(bodyParser.urlencoded({ extended: true }));
|
||||||
app.use(expressValidator());
|
app.use(expressValidator());
|
||||||
app.use(methodOverride());
|
app.use(methodOverride());
|
||||||
app.use(cookieParser());
|
app.use(cookieParser());
|
||||||
@ -103,7 +103,7 @@ app.use(function(req, res, next) {
|
|||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
// Remember original destination before login.
|
// Remember original destination before login.
|
||||||
var path = req.path.split('/')[1];
|
var path = req.path.split('/')[1];
|
||||||
if (/auth|login|logout|signup|img|fonts|favicon/i.test(path)) {
|
if (/auth|login|logout|signup|fonts|favicon/i.test(path)) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
req.session.returnTo = req.path;
|
req.session.returnTo = req.path;
|
||||||
|
Reference in New Issue
Block a user