Skip to content

Commit 897bd51

Browse files
committed
UI routes: fix root route matching all subpaths
1 parent f69822c commit 897bd51

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

codegen/codegentemplates/uiroutes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
// even though we have a Single-Page-Application -style frontend we should reserve the frontend routes at backend
1111
// so when user refreshes the page they'll get the SPA bootstrap page for every possible frontend route.
1212
func RegisterUIRoutes(routes *http.ServeMux, uiHandler http.HandlerFunc) { {{range .Module.UiRoutes}}
13-
routes.HandleFunc("GET {{.Path}}", uiHandler){{end}}
13+
routes.HandleFunc("GET {{if eq .Path "/"}}/{$}{{else}}{{.Path}}{{end}}", uiHandler){{end}}
1414
}
1515
`
1616

0 commit comments

Comments
 (0)