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