mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added exemple debug user on NS_NOUSER env variable
This commit is contained in:
parent
765ca2556e
commit
9ff253bb1a
1 changed files with 12 additions and 0 deletions
|
@ -26,6 +26,18 @@ module.exports = function (options) {
|
|||
return req.url.split('?')[0] === exc
|
||||
})
|
||||
|
||||
if (process.env.NS_NOUSER) {
|
||||
req.session = {
|
||||
user: {
|
||||
id: 21323
|
||||
},
|
||||
sessionID: sessionID || 111111111111111111,
|
||||
isException: false
|
||||
}
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
// FIXME Allowing all urls with _next in it, but not in params
|
||||
if (req.url.split('?')[0].includes('_next')) {
|
||||
req.session = { isException: true }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue