Skip to content

Commit 2722b1d

Browse files
committed
Revive the favicon by skipping SPA for /ui/*.svg
1 parent 38e6c8b commit 2722b1d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/dev_server/dev_server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ func (c LDClient) RunServer(ctx context.Context, serverParams ServerParams) {
7474
r.Use(model.ObserversMiddleware(observers))
7575
r.Handle("/", http.RedirectHandler("/ui/", http.StatusFound))
7676
r.Handle("/ui", http.RedirectHandler("/ui/", http.StatusMovedPermanently))
77+
r.Handle("/ui/{_}.svg", http.StripPrefix("/ui/", ui.AssetHandler))
7778
r.PathPrefix("/ui/").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
7879
r.URL.Path = "/" // UI is a SPA, so we want to ignore the url path when we serve assets.
7980
ui.AssetHandler.ServeHTTP(w, r)

0 commit comments

Comments
 (0)