Skip to content

Commit

Permalink
support requireHttps
Browse files Browse the repository at this point in the history
closes #1473
  • Loading branch information
Steve-Mcl authored Nov 19, 2024
1 parent 75c7e62 commit b15c862
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nodes/config/ui_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,17 @@ module.exports = function (RED) {
const host = RED.settings.uiHost
const port = RED.settings.uiPort
const httpAdminRoot = RED.settings.httpAdminRoot
const url = 'http://' + (`${host}:${port}/${httpAdminRoot}flows`).replace('//', '/')
let scheme = 'http://'
let httpsAgent
if (RED.settings.requireHttps) {
if (RED.settings.https) {
httpsAgent = new Agent({

Check failure on line 1137 in nodes/config/ui_base.js

View workflow job for this annotation

GitHub Actions / build / Build on 18

'httpsAgent' is assigned a value but never used

Check failure on line 1137 in nodes/config/ui_base.js

View workflow job for this annotation

GitHub Actions / build / Build on 18

'Agent' is not defined
rejectUnauthorized: false
})
}
scheme = 'https://'
}
const url = scheme + (`${host}:${port}/${httpAdminRoot}flows`).replace('//', '/')
console.log('url', url)
// get request body
const dashboardId = req.params.dashboardId
Expand Down

0 comments on commit b15c862

Please sign in to comment.