Merge branch 'jameskopacz-patch-259' of https://github.com/jameskopacz/freecodecamp into ux-improvements
This commit is contained in:
4
app.js
4
app.js
@ -213,7 +213,9 @@ app.use(function (req, res, next) {
|
||||
app.use(function (req, res, next) {
|
||||
// Remember original destination before login.
|
||||
var path = req.path.split('/')[1];
|
||||
if (/auth|login|logout|signup|fonts|favicon/i.test(path)) {
|
||||
if (/auth|login|logout|signin|signup|fonts|favicon/i.test(path)) {
|
||||
return next();
|
||||
} else if (/\/stories\/comments\/\w+/i.test(req.path)) {
|
||||
return next();
|
||||
}
|
||||
req.session.returnTo = req.path;
|
||||
|
Reference in New Issue
Block a user