From 8f0c62bd77e14a92bec2f88a41495cab5b045bec Mon Sep 17 00:00:00 2001 From: bel Date: Wed, 7 May 2025 22:27:06 -0600 Subject: [PATCH] runs --- src/cmd/server/handler/ui.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cmd/server/handler/ui.go b/src/cmd/server/handler/ui.go index 5f5ca0f..d79ffa9 100644 --- a/src/cmd/server/handler/ui.go +++ b/src/cmd/server/handler/ui.go @@ -2,11 +2,13 @@ package handler import ( "encoding/json" + "fmt" "net/http" "os" "path" "show-rss/src/feeds" "slices" + "strings" "text/template" "time" @@ -33,7 +35,8 @@ func (h Handler) ui(w http.ResponseWriter, r *http.Request) error { } fs := http.FileServer(http.FS(embeddedDir)) - http.StripPrefix("/experimental/ui", fs).ServeHTTP(w, r) + r.URL.Path = fmt.Sprintf("/testdata/%s", strings.TrimPrefix(r.URL.Path, "/experimental/ui")) + fs.ServeHTTP(w, r) return nil }