aports/community/alertmanager/disable-ui-embed.patch
2026-05-06 16:48:07 +00:00

25 lines
474 B
Diff

--- a/ui/web.go
+++ b/ui/web.go
@@ -16,7 +16,6 @@
import (
"bytes"
"compress/gzip"
- "embed"
"io"
"io/fs"
"net/http"
@@ -28,8 +27,11 @@
"github.com/prometheus/common/route"
)
-//go:embed app/dist
-var asset embed.FS
+type noopFS struct{}
+
+func (noopFS) Open(_ string) (fs.File, error) { return nil, fs.ErrNotExist }
+
+var asset fs.FS = noopFS{}
var fileTypes = map[string]struct {
contentType string // https://www.iana.org/assignments/media-types/