Fix root route parsing to exclude base

This commit is contained in:
2020-11-04 20:58:09 -06:00
parent 83b11e267e
commit d1d12663a7
2 changed files with 6 additions and 1 deletions

View File

@@ -21,6 +21,10 @@ class FrontendUnit extends Unit {
app.express.use('/app', [
this.canon.get('middleware::auth:UserOnly'),
(req, res, next) => {
if ( !req.user ) {
return res.redirect('/auth/login')
}
const allowed_extensions = [
'.html', '.js', '.css', '.svg', '.ttf', '.jpg', '.png',
'.jpeg', '.webmanifest', '.json', '.eot', '.svg', '.cur',