1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/middleware/no-authentication.js

13 lines
277 B
JavaScript
Raw Normal View History

'use strict';
const User = require('../user');
function noneAuthentication(basePath = '', app) {
app.use(`${basePath}/api/admin/`, (req, res, next) => {
2020-10-02 16:32:05 +02:00
req.user = new User({ username: 'unknown' });
next();
});
}
module.exports = noneAuthentication;