From 2a2413b644749603d21dda83f54fe49d61437f75 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Thu, 2 Feb 2023 11:06:05 -0600 Subject: [PATCH] fix: default to https in login url Fixes #44. --- src/commands.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands.ts b/src/commands.ts index 3d29fd0f..6ca5e24e 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -21,6 +21,11 @@ export class Commands { if (!url) { return } + if (!url.startsWith("http://") && !url.startsWith("https://")) { + // Default to HTTPS if not provided! + // https://github.com/coder/vscode-coder/issues/44 + url = "https://" + url + } let token: string | undefined = args.length >= 2 ? args[1] : undefined if (!token) {