mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02: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);
|
RED.init(server,settings);
|
||||||
|
|
||||||
//if (settings.httpAdminRoot !== false && settings.httpAdminAuth) {
|
if (settings.httpAdminRoot !== false && settings.httpAdminAuth) {
|
||||||
// app.use(settings.httpAdminRoot,
|
RED.log.warn("use of httpAdminAuth is deprecated. Use adminAuth instead");
|
||||||
// express.basicAuth(function(user, pass) {
|
app.use(settings.httpAdminRoot,
|
||||||
// return user === settings.httpAdminAuth.user && crypto.createHash('md5').update(pass,'utf8').digest('hex') === settings.httpAdminAuth.pass;
|
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) {
|
if (settings.httpNodeRoot !== false && settings.httpNodeAuth) {
|
||||||
app.use(settings.httpNodeRoot,
|
app.use(settings.httpNodeRoot,
|
||||||
|
Loading…
Reference in New Issue
Block a user