Skip to content

Commit

Permalink
Merge pull request #36 from roidelapluie/favicon
Browse files Browse the repository at this point in the history
Fix serving of /favicon.ico
  • Loading branch information
roidelapluie authored Oct 25, 2022
2 parents e8e3760 + a54b3b0 commit c2de6b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/react/react.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"path"
"strings"

"github.com/prometheus/common/server"

ui "github.com/prometheus/promlens/app"
)

Expand Down Expand Up @@ -68,6 +70,6 @@ func Handle(routePrefix string, externalURL *url.URL) http.HandlerFunc {
// For all other paths, serve auxiliary assets.
r.URL.Path = strings.TrimPrefix(r.URL.Path, routePrefix)
r.URL.Path = path.Join("/build", r.URL.Path)
http.FileServer(ui.Assets).ServeHTTP(w, r)
server.StaticFileServer(ui.Assets).ServeHTTP(w, r)
}
}

0 comments on commit c2de6b2

Please sign in to comment.