Skip to content

Commit

Permalink
Merge pull request #105 from Bre77/fix_port
Browse files Browse the repository at this point in the history
Fix port behavior of URL() in notebooks.
  • Loading branch information
JasonConger authored Oct 5, 2023
2 parents 67068d0 + 7fb62c5 commit b8d7d3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions out/notebooks/splunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getClient() {

let url = new URL(restUrl);
const scheme = url.protocol.replace(':', '');
const port = url.port;
const port = url.port || (scheme === 'https' ? '443' : '80');
const host = url.hostname;

let service = new splunk.Service({
Expand Down Expand Up @@ -337,4 +337,4 @@ export function wait(ms = 1000) {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
}
}

0 comments on commit b8d7d3e

Please sign in to comment.