Skip to content

Commit

Permalink
Append https if not present
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Nov 21, 2023
1 parent c7772ee commit 51ac9ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "substreams-sink",
"version": "0.13.0",
"version": "0.13.1",
"description": "Substreams Sink",
"type": "module",
"exports": "./dist/index.js",
Expand Down
7 changes: 6 additions & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ export async function setup(options: RunOptions) {
// auth API token
// https://app.streamingfast.io/
const token = await parseAuthorization(options.substreamsApiToken, options.authIssueUrl);
const baseUrl = options.substreamsEndpoint;
let baseUrl = options.substreamsEndpoint;

// append https if not present
if ( baseUrl.match(/http/) === null ) {
baseUrl = `https://${baseUrl}`;
}

// User parameters
const outputModule = options.moduleName;
Expand Down

0 comments on commit 51ac9ac

Please sign in to comment.