mirror of
https://github.com/node-red/node-red
synced 2024-11-23 08:59:13 +00:00
Restore httpAdminAuth with deprecation warning
This commit is contained in:
parent
5e2c51a741
commit
e8666827e6
15
red.js
15
red.js
@ -121,13 +121,14 @@ settings.flowFile = flowFile || settings.flowFile;
|
||||
|
||||
RED.init(server,settings);
|
||||
|
||||
//if (settings.httpAdminRoot !== false && settings.httpAdminAuth) {
|
||||
// app.use(settings.httpAdminRoot,
|
||||
// express.basicAuth(function(user, pass) {
|
||||
// return user === settings.httpAdminAuth.user && crypto.createHash('md5').update(pass,'utf8').digest('hex') === settings.httpAdminAuth.pass;
|
||||
// })
|
||||
// );
|
||||
//}
|
||||
if (settings.httpAdminRoot !== false && settings.httpAdminAuth) {
|
||||
RED.log.warn("use of httpAdminAuth is deprecated. Use adminAuth instead");
|
||||
app.use(settings.httpAdminRoot,
|
||||
express.basicAuth(function(user, pass) {
|
||||
return user === settings.httpAdminAuth.user && crypto.createHash('md5').update(pass,'utf8').digest('hex') === settings.httpAdminAuth.pass;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (settings.httpNodeRoot !== false && settings.httpNodeAuth) {
|
||||
app.use(settings.httpNodeRoot,
|
||||
|
Loading…
Reference in New Issue
Block a user