WIP: redirect anonymous bare root url to /share #658

Redirect works. Must share at least one note and make it `#shareRoot`

Todo:
- explore making this an optional setting in UI
- make the share and login urls customizable
- think about if/where/how to put login link in default share theme
This commit is contained in:
maphew
2024-11-23 12:47:34 -07:00
parent 68fd954a67
commit 2c802b9e12

View File

@@ -17,7 +17,8 @@ function checkAuth(req: AppRequest, res: Response, next: NextFunction) {
res.redirect("setup");
}
else if (!req.session.loggedIn && !utils.isElectron() && !noAuthentication) {
res.redirect("login");
// res.redirect("login");
res.redirect("share");
}
else {
next();