UNPKG

nf-workflow-ui-5

Version:
16 lines (12 loc) 265 B
export default class AuthFilter { init(app) { app.use((req, res, next) => { const { headers: { authorization = '' } = {} } = req; if (!authorization) { return next(); } req.token = authorization; next(); }); } }