Skip to content

Commit

Permalink
Beta release (#135)
Browse files Browse the repository at this point in the history
* chore: Next release version [skip-ci] (#130)

* refactor: Fixed typescript warnings (#131)

* refactor: Updated env vars name (#132)

* fix: Support http or https scheme in TIGRIS_URI (#134)

Co-authored-by: Adil Ansari <[email protected]>
  • Loading branch information
JigarJoshi and adilansari authored Oct 24, 2022
1 parent c2b7989 commit c29b305
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tigris.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ export class Tigris {
* @param {TigrisClientConfig} config configuration
*/
constructor(config: TigrisClientConfig) {
if (config.serverUrl.startsWith("https://")) {
config.serverUrl = config.serverUrl.replace("https://", "");
}
if (config.serverUrl.startsWith("http://")) {
config.serverUrl = config.serverUrl.replace("http://", "");
}
if (!config.serverUrl.includes(":")) {
config.serverUrl = config.serverUrl + ":" + DEFAULT_GRPC_PORT;
}
Expand Down

0 comments on commit c29b305

Please sign in to comment.