From d368ab6b8f6b37c49d7bafd427239b6899ab7f1b Mon Sep 17 00:00:00 2001 From: Adam Schubert Date: Tue, 21 Dec 2021 20:59:38 +0100 Subject: [PATCH] fix(Connection): Do not pass Auth info in URL to router, some firmware versions don't like it... --- src/Connection.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Connection.ts b/src/Connection.ts index 7ceb748..086358b 100644 --- a/src/Connection.ts +++ b/src/Connection.ts @@ -36,18 +36,18 @@ export class Connection { constructor(url: string, timeout: number) { this.session = new Session(timeout); - this.url = url; - if (!this.url.endsWith('/')) { - this.url += '/'; + if (!url.endsWith('/')) { + url += '/'; } - const urlInfo = new URL(this.url); + const urlInfo = new URL(url); const username = urlInfo.username; const password = urlInfo.password; urlInfo.username = ''; urlInfo.password = ''; + this.url = urlInfo.toString(); this.ready = new Promise((resolve, reject) => { this.initializeCsrfTokensAndSession().then(() => {