Skip to content

Commit

Permalink
Update OAuth2Client.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Emile Nijssen authored Dec 5, 2023
1 parent db77589 commit 446102c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/OAuth2Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,11 @@ class OAuth2Client extends EventEmitter {
opts.body = body;
}

let url = `${this._apiUrl}${path}${urlAppend}`;
let url;
if (path.startsWith('http://') || path.startsWith('https://')) {
url = `${path}${urlAppend}`;
url = `${path}${urlAppend}`; // Allow the use of absolute URLs to ignore this._apiUrl
} else {
url = `${this._apiUrl}${path}${urlAppend}`;
}

return {
Expand Down

0 comments on commit 446102c

Please sign in to comment.