3
0

Fix global value store URL construction with custom paths

This commit is contained in:
Tomaž Jerman
2022-08-22 15:59:49 +02:00
parent 91252ac93d
commit 6799d3f8de
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -759,8 +759,7 @@ func initValuestore(opt *options.Options) {
}
// Web applications
for _, w := range strings.Split(opt.HTTPServer.WebappList, ",") {
w = strings.TrimSpace(w)
webappBaseURLWebapps[w] = webappBaseURL + w
webappBaseURLWebapps[w] = fmt.Sprintf("%s/%s", strings.TrimRight(webappBaseURL, "/"), strings.TrimSpace(w))
}
// Webapp related values -- domain, base url (for webapps), ...
+2 -2
View File
@@ -92,11 +92,11 @@ func pathPrefix(pp ...string) string {
// will return base URL with domain and prefix path
func FullURL(pp ...string) string {
return fullUrl(GuessApiHostname())
return fullUrl(GuessApiHostname(), pp...)
}
func FullWebappURL(pp ...string) string {
return fullUrl(GuessWebappHostname())
return fullUrl(GuessWebappHostname(), pp...)
}
// will return base URL with domain and prefix path