From a1bb6e47837475517337272aac28cdd19b709288 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 9 Feb 2026 17:35:21 +0700 Subject: [PATCH] Update architecture --- Dockerfile | 2 +- main.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 05eb3c4..a1997ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /app COPY go.mod go.sum ./ RUN go mod download -COPY main.go index.html favicon.ico ./ +COPY main.go index.html favicon.png ./ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o nats-ui main.go # Runtime stage diff --git a/main.go b/main.go index 7296afa..eff5fd4 100644 --- a/main.go +++ b/main.go @@ -18,7 +18,7 @@ import ( "gopkg.in/yaml.v3" ) -//go:embed index.html favicon.ico +//go:embed index.html favicon.png var staticFS embed.FS var upgrader = websocket.Upgrader{ @@ -315,7 +315,7 @@ func main() { }() } indexHTML, _ := staticFS.ReadFile("index.html") - faviconICO, _ := staticFS.ReadFile("favicon.ico") + faviconPNG, _ := staticFS.ReadFile("favicon.png") http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { @@ -324,9 +324,9 @@ func main() { w.WriteHeader(http.StatusOK) _, _ = w.Write(indexHTML) case "/favicon.ico": - w.Header().Set("Content-Type", "image/x-icon") + w.Header().Set("Content-Type", "image/png") w.WriteHeader(http.StatusOK) - _, _ = w.Write(faviconICO) + _, _ = w.Write(faviconPNG) default: http.NotFound(w, r) }