From ee53e0b11aaba046dc8bed53bc348084caf46789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Sun, 9 Aug 2026 09:06:11 +0400 Subject: [PATCH] =?UTF-8?q?fix:=20/static/logo.svg=20=D0=BA=D0=B0=D0=BA=20?= =?UTF-8?q?=D0=B2=20drhider=20(embed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/logo.svg | 25 +++++++++++++++++++++++++ server/main.go | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 server/logo.svg diff --git a/server/logo.svg b/server/logo.svg new file mode 100755 index 0000000..d76eef6 --- /dev/null +++ b/server/logo.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/server/main.go b/server/main.go index 87d6249..9f681ca 100644 --- a/server/main.go +++ b/server/main.go @@ -3,6 +3,7 @@ package main import ( "bufio" "context" + "embed" "encoding/json" "fmt" "io" @@ -20,6 +21,9 @@ import ( "github.com/minio/minio-go/v7/pkg/credentials" ) +//go:embed logo.svg +var logoFile embed.FS + var ( s3Client *s3.Client bucketName = "terraform-registry" // Default @@ -105,6 +109,7 @@ func main() { http.HandleFunc("/v1/providers/", router) http.HandleFunc("/v1/proxy", proxyHandler) http.HandleFunc("/docs/", docsHandler) + http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(logoFile)))) http.Handle("/", http.HandlerFunc(rootHandler)) http.HandleFunc("/healthz", healthzHandler) http.HandleFunc("/readyz", readyzHandler) @@ -221,7 +226,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
- nubes + nubes