mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Auth fix, stats script sorted output, login tip change
This commit is contained in:
parent
720e616e6a
commit
ef9a60fd7f
4 changed files with 16 additions and 7 deletions
|
@ -47,6 +47,12 @@ module.exports = function (options) {
|
|||
const user = GetUserBySessionID(userDB, sessionID, req)
|
||||
|
||||
if (!user) {
|
||||
if (isException) {
|
||||
logger.DebugLog(`EXCEPTION: ${req.url}`, 'auth', 1)
|
||||
req.session = { isException: true }
|
||||
next()
|
||||
return
|
||||
}
|
||||
logger.DebugLog(`No user:${req.url}`, 'auth', 1)
|
||||
renderLogin(req, res)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue