Skip to content

Commit

Permalink
Merge branch 'main' into two-outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex committed Oct 12, 2023
2 parents e6dcb05 + 8ff84fd commit 42decfb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nodes/http-auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
</p>

<p>
<img src="https://raw.githubusercontent.com/alexandrainst/node-red-http-basic-auth/main/images/flow.png" />
<img src="node-red-http-basic-auth/images/flow.png" />
<p>

<h2>Config</h2>
Expand Down
16 changes: 16 additions & 0 deletions nodes/http-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,20 @@ module.exports = function (RED) {
}

RED.nodes.registerType('http-basic-auth', HttpAuthNode);

if (RED.httpAdmin) {
const path = require('path');
RED.httpAdmin.get('/node-red-http-basic-auth/images/:name', (req, res, next) => {
const options = {
root: path.join(__dirname, '..', 'images'),
dotfiles: 'deny',
};
const fileName = req.params.name;
res.sendFile(fileName, options, (err) => {
if (err) {
next(err);
}
});
});
}
};

0 comments on commit 42decfb

Please sign in to comment.