outpost/embedded: fix schema

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-08 23:09:35 +02:00
parent 03958d170b
commit fe91bff854
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package proxy
import ( import (
"crypto/tls" "crypto/tls"
"fmt"
"net" "net"
"net/http" "net/http"
"net/url" "net/url"
@ -38,7 +39,7 @@ func intToPointer(i int) *int {
func (pb *providerBundle) replaceLocal(url string) string { func (pb *providerBundle) replaceLocal(url string) string {
if strings.Contains(url, "localhost:8000") { if strings.Contains(url, "localhost:8000") {
f := strings.ReplaceAll(url, "localhost:8000", pb.s.ak.Client.GetConfig().Host) 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 f
} }
return url return url