From cd361907a387178afe3dca1e99a288e93199bf37 Mon Sep 17 00:00:00 2001 From: mls-361 Date: Tue, 10 Aug 2021 20:37:33 +0200 Subject: [PATCH] =?UTF-8?q?En=20cours=20de=20d=C3=A9veloppement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/cli/requestor.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/cli/requestor.go b/internal/cli/requestor.go index a2762b2..5b95b90 100644 --- a/internal/cli/requestor.go +++ b/internal/cli/requestor.go @@ -24,8 +24,14 @@ func newRequestor(ccs *components.Components) (jw.Model, error) { } cfg := ccs.Config.Server() + scheme := "http" + + if cfg.TLS != nil { + scheme += "s" + } + endpoint := &requestor.Endpoint{ - URL: fmt.Sprintf("https://localhost:%d", cfg.Port), + URL: fmt.Sprintf("%s://localhost:%d", scheme, cfg.Port), Username: username, Password: password, }