From fe91bff85467342e8c3da1595c5619d8ddb284c0 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 8 Aug 2021 23:09:35 +0200 Subject: [PATCH] outpost/embedded: fix schema Signed-off-by: Jens Langhammer --- internal/outpost/proxy/api_bundle.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/outpost/proxy/api_bundle.go b/internal/outpost/proxy/api_bundle.go index bc0db6e5e..41b4f5194 100644 --- a/internal/outpost/proxy/api_bundle.go +++ b/internal/outpost/proxy/api_bundle.go @@ -2,6 +2,7 @@ package proxy import ( "crypto/tls" + "fmt" "net" "net/http" "net/url" @@ -38,7 +39,7 @@ func intToPointer(i int) *int { func (pb *providerBundle) replaceLocal(url string) string { if strings.Contains(url, "localhost:8000") { f := strings.ReplaceAll(url, "localhost:8000", pb.s.ak.Client.GetConfig().Host) - f = strings.ReplaceAll(f, "http", pb.s.ak.Client.GetConfig().Scheme) + f = strings.ReplaceAll(f, "http://", fmt.Sprintf("%s://", pb.s.ak.Client.GetConfig().Scheme)) return f } return url