mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Locking down some paths not meant to be seen with url
This commit is contained in:
@@ -183,6 +183,14 @@ app.use('/logout', function(req, res) {
|
||||
res.redirect('/login');
|
||||
});
|
||||
|
||||
app.use('/assets/admin/authenticated', function(req, res, next) {
|
||||
if(!req.isAuthenticated()) {
|
||||
res.sendStatus(403);
|
||||
return;
|
||||
}
|
||||
return next();
|
||||
});
|
||||
|
||||
app.use('/assets', express.static(publicPath + '/assets'));
|
||||
|
||||
app.use('/', isLoggedIn, function(req, res) {
|
||||
|
||||
@@ -86,6 +86,16 @@ app.use('/', ico_router);
|
||||
app.use('/', api);
|
||||
app.use('/', router);
|
||||
|
||||
app.use('/assets/js', function(req, res, next) {
|
||||
res.sendStatus(403);
|
||||
return;
|
||||
});
|
||||
|
||||
app.use('/assets/admin', function(req, res, next) {
|
||||
res.sendStatus(403);
|
||||
return;
|
||||
});
|
||||
|
||||
app.use('/assets', express.static(publicPath + '/assets'));
|
||||
|
||||
app.use(function (req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user