File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ type Handler struct {
124124 // paths prefixed with "/web/". Defaults to app.LocalDir("").
125125 Resources ResourceResolver
126126
127+ // StartURL is the URL opened by default when the installed PWA is opened.
128+ // This, however, does not affect the default URL when the app is opened
129+ // as normal website in the browser. Defaults to "/".
130+ StartURL string
131+
127132 // Version defines the app's version. It's crucial for determining if an
128133 // update is available. Must be set in live environments to avoid recurring
129134 // updates. Auto-generated by default for local development updates.
@@ -408,7 +413,7 @@ func (h *Handler) makeManifestJSON() []byte {
408413 Name : h .Name ,
409414 Description : h .Description ,
410415 Scope : "/" ,
411- StartURL : h .Resources .Resolve ("/" ),
416+ StartURL : h .Resources .Resolve (h . StartURL ),
412417 BackgroundColor : h .BackgroundColor ,
413418 ThemeColor : h .ThemeColor ,
414419 Display : "standalone" ,
You can’t perform that action at this time.
0 commit comments