Compare commits

..
1 Commits
Author SHA1 Message Date
gisle 7c55fc03aa Fixed locals middleware doing an auth check for assets, scripts and other static content.
the build was successful
2019-05-19 21:37:01 +02:00
+2
View File
@@ -28,6 +28,7 @@ module.exports = (req, res, next) => {
}
}
if (["/static/", "/hax/", "/assets/"].find(p => req.path.startsWith(p)) == null) {
if (req.user) {
res.locals.user = {
loggedIn: true,
@@ -39,6 +40,7 @@ module.exports = (req, res, next) => {
loggedIn: false,
}
}
}
next()
}