parent
8701df1acc
commit
64356d42d0
@ -1,17 +0,0 @@
|
||||
const Middleware = require('libflitter/middleware/Middleware')
|
||||
class DMZOnly extends Middleware {
|
||||
|
||||
async test(req, res, next, args = {}){
|
||||
|
||||
if ( req.is_auth ) return next()
|
||||
else {
|
||||
// If not signed in, save the target url so we can redirect back here after auth
|
||||
req.session.auth.flow = req.originalUrl
|
||||
return res.redirect('/auth/login')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = DMZOnly
|
Loading…
Reference in new issue