mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Auth exception fix
This commit is contained in:
parent
e371744f18
commit
d2a8f29b21
1 changed files with 6 additions and 0 deletions
|
@ -47,6 +47,12 @@ module.exports = function (options) {
|
||||||
const user = GetUserBySessionID(userDB, sessionID, req)
|
const user = GetUserBySessionID(userDB, sessionID, req)
|
||||||
|
|
||||||
if (!user) {
|
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)
|
logger.DebugLog(`No user:${req.url}`, 'auth', 1)
|
||||||
renderLogin(req, res)
|
renderLogin(req, res)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue