diff --git a/pkg/app/http.go b/pkg/app/http.go index ce663029..d6c21dc4 100644 --- a/pkg/app/http.go +++ b/pkg/app/http.go @@ -380,11 +380,6 @@ func (h *Handler) makeAppWorkerJS() []byte { } func (h *Handler) makeManifestJSON() []byte { - scope := h.Resources.Resolve("/") - if scope != "/" && !strings.HasSuffix(scope, "/") { - scope += "/" - } - var b bytes.Buffer if err := template. Must(template.New("manifest.webmanifest").Parse(manifestJSON)). @@ -410,7 +405,7 @@ func (h *Handler) makeManifestJSON() []byte { MaskableIcon: h.Resources.Resolve(h.Icon.Maskable), BackgroundColor: h.BackgroundColor, ThemeColor: h.ThemeColor, - Scope: scope, + Scope: "/", StartURL: h.Resources.Resolve("/"), }); err != nil { panic(errors.New("initializing manifest.webmanifest failed").Wrap(err)) diff --git a/pkg/app/http_test.go b/pkg/app/http_test.go index be7ac3b4..9751a8e0 100644 --- a/pkg/app/http_test.go +++ b/pkg/app/http_test.go @@ -411,7 +411,7 @@ func TestHandlerServeManifestJSONWithGitHubPages(t *testing.T) { require.Contains(t, body, `"src": "https://raw.githubusercontent.com/maxence-charriere/go-app/master/docs/web/icon.png"`) require.Contains(t, body, `"background_color": "#0000f0"`) require.Contains(t, body, `"theme_color": "#0000ff"`) - require.Contains(t, body, `"scope": "/go-app/"`) + require.Contains(t, body, `"scope": "/"`) require.Contains(t, body, `"start_url": "/go-app"`) }