proxyauth: redirect correctly after login

This commit is contained in:
Girish Ramakrishnan
2020-11-10 23:39:57 -08:00
parent 045963afe5
commit 008fa09877
2 changed files with 9 additions and 6 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ function jwtVerify(req, res, next) {
}
function loginPage(req, res) {
return res.sendfile(path.join(paths.DASHBOARD_DIR, 'proxyauth-login.html'));
return res.sendFile(path.join(paths.DASHBOARD_DIR, 'proxyauth-login.html'));
}
// called by nginx to authorize any protected route
@@ -128,7 +128,7 @@ function initializeAuthwallExpressSync() {
.use(router)
.use(middleware.lastMile());
router.get ('/', (req, res) => { res.redirect('/login'); });
router.get ('/', (req, res) => { res.redirect('/login'); }); // this can never happen
router.get ('/login', loginPage);
router.get ('/auth', auth);
router.post('/login', login);