mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
13 lines
277 B
JavaScript
13 lines
277 B
JavaScript
'use strict';
|
|
|
|
const User = require('../user');
|
|
|
|
function noneAuthentication(basePath = '', app) {
|
|
app.use(`${basePath}/api/admin/`, (req, res, next) => {
|
|
req.user = new User({ username: 'unknown' });
|
|
next();
|
|
});
|
|
}
|
|
|
|
module.exports = noneAuthentication;
|