Merge branch 'master' of gitlab.com:MrFry/mrfrys-node-server into master

This commit is contained in:
MrFry 2020-08-30 09:55:54 +02:00
commit 72470d0366
3 changed files with 21 additions and 8 deletions

View file

@ -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.url.split('?')[0].includes('well-known/acme-challenge')) {
req.session = { isException: true }