outpost/proxy: fix string substitution for internal
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
837fa23af0
commit
03958d170b
|
@ -36,10 +36,13 @@ 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)
|
||||
return f
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
func (pb *providerBundle) prepareOpts(provider api.ProxyOutpostConfig) *options.Options {
|
||||
externalHost, err := url.Parse(provider.ExternalHost)
|
||||
|
|
Reference in New Issue