From c4771b0910db2e24b0d98b0783416330813f3573 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 10 Sep 2020 10:27:47 +0200 Subject: [PATCH] Change external app config to just use the paths of the js bundles --- pkg/service/v0/service.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkg/service/v0/service.go b/pkg/service/v0/service.go index c6535f621..6ff9853a6 100644 --- a/pkg/service/v0/service.go +++ b/pkg/service/v0/service.go @@ -72,11 +72,11 @@ func (p Phoenix) getPayload() (payload []byte, err error) { p.config.Phoenix.Config.ExternalApps = []config.ExternalApp{ { ID: "accounts", - Path: singleJoiningSlash(p.config.Phoenix.Config.Server, "accounts.js"), + Path: "/accounts.js", }, { ID: "settings", - Path: singleJoiningSlash(p.config.Phoenix.Config.Server, "settings.js"), + Path: "/settings.js", }, } } @@ -109,18 +109,6 @@ func (p Phoenix) getPayload() (payload []byte, err error) { return } -func singleJoiningSlash(a, b string) string { - aslash := strings.HasSuffix(a, "/") - bslash := strings.HasPrefix(b, "/") - switch { - case aslash && bslash: - return a + b[1:] - case !aslash && !bslash: - return a + "/" + b - } - return a + b -} - // Config implements the Service interface. func (p Phoenix) Config(w http.ResponseWriter, r *http.Request) {