Redirect bare url to /share page, or swap them #596
Unanswered
maphew
asked this question in
Q&A / Support
Replies: 2 comments
-
At the technical level, it's actually easy to redirect bare domain to share:
function checkAuth(req: AppRequest, res: Response, next: NextFunction) {
if (!sqlInit.isDbInitialized()) {
res.redirect("setup");
}
else if (!req.session.loggedIn && !utils.isElectron() && !noAuthentication) {
#res.redirect("login");
res.redirect("share");
}
else {
next();
}
}
To login, edit url in address bar and replace path with '/login', ex: ... This won't work for PikaPods since they only use the lates release stable release from Docker Hub, and making this change in stable needs more thought, work, and documentation. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've turned this into a feature enhancement issue - #658 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to setup Trilium to redirect bare url to the share page, unless the user is logged in? So an anonymous browser arriving at
www.example.net
is redirected towww.example.net/share
instead of being greeted with the login page.Or perhaps better, make the share url
www.example.net/
and the "I'm editing" urlwww.example.net/edit
?preferably using a docker config (so it can be used on PikaPods)
Beta Was this translation helpful? Give feedback.
All reactions