mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-05 12:26:14 +02:00
Remove obsolete /classic/static route
The /classic/static/* route was added to serve vendor JavaScript and CSS files (jQuery, Bootstrap, etc.) for console templates. These vendor assets were removed in #14807 due to security vulnerabilities, making this route obsolete as it now serves an empty directory. The console feature remains functional via --web.console.templates and --web.console.libraries flags. Users who need JavaScript/CSS libraries in their custom console templates must provide these assets within the directory specified by --web.console.libraries. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
This commit is contained in:
parent
46e58a68da
commit
bd7ed84a39
@ -455,13 +455,6 @@ func New(logger *slog.Logger, o *Options) *Handler {
|
||||
reactAssetsRoot = "/static/react-app"
|
||||
}
|
||||
|
||||
// The console library examples at 'console_libraries/prom.lib' still depend on old asset files being served under `classic`.
|
||||
router.Get("/classic/static/*filepath", func(w http.ResponseWriter, r *http.Request) {
|
||||
r.URL.Path = path.Join("/static", route.Param(r.Context(), "filepath"))
|
||||
fs := server.StaticFileServer(ui.Assets)
|
||||
fs.ServeHTTP(w, r)
|
||||
})
|
||||
|
||||
router.Get("/version", h.version)
|
||||
router.Get("/metrics", promhttp.Handler().ServeHTTP)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user