Skip to content

Commit

Permalink
fix(Connection): Do not pass Auth info in URL to router, some firmwar…
Browse files Browse the repository at this point in the history
…e versions don't like it...
  • Loading branch information
Salamek committed Dec 21, 2021
1 parent b69111a commit d368ab6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit d368ab6

Please sign in to comment.