diff --git a/backend/utils/common.js b/backend/utils/common.js index 91dbe64d..c6e8f569 100644 --- a/backend/utils/common.js +++ b/backend/utils/common.js @@ -192,11 +192,11 @@ export class CommonService { } }; this.setOptions = (req) => { - if (this.nodes[0].authentication.options && this.nodes[0].authentication.options.headers) { - return; - } if (this.nodes && this.nodes.length > 0) { this.nodes.forEach((node) => { + if (node.authentication.options && node.authentication.options.headers) { + return; + } node.authentication.options = { url: '', rejectUnauthorized: false, diff --git a/server/utils/common.ts b/server/utils/common.ts index f86ce407..0af97283 100644 --- a/server/utils/common.ts +++ b/server/utils/common.ts @@ -204,9 +204,9 @@ export class CommonService { }; public setOptions = (req) => { - if (this.nodes[0].authentication.options && this.nodes[0].authentication.options.headers) { return; } if (this.nodes && this.nodes.length > 0) { this.nodes.forEach((node) => { + if (node.authentication.options && node.authentication.options.headers) { return; } node.authentication.options = { url: '', rejectUnauthorized: false,