diff --git a/plugin/src/App/init.lua b/plugin/src/App/init.lua index a9914c40..7c8abaaa 100644 --- a/plugin/src/App/init.lua +++ b/plugin/src/App/init.lua @@ -264,7 +264,9 @@ function App:startSession(host: string?, port: string?) twoWaySync = Settings:get("twoWaySync"), } - local baseUrl = string.format("http://%s:%s", host :: string, port :: string) + local baseUrl = if string.find(host, "^https?://") + then string.format("%s:%s", host, port) + else string.format("http://%s:%s", host, port) local apiContext = ApiContext.new(baseUrl) local serveSession = ServeSession.new({