Update favicon handling and bump version to v0.6.1
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled

- main.go
  - Removed static favicon serving from `ServeMux`.
  - Removed import for `net/http`.

- pkg/version/version
  - Updated version from v0.6.0 to v0.6.1.

- cmd/lerproxy/main.go
  - Added embedded support for default favicon using `//go:embed`.
  - Modified logic to serve favicon as an embedded resource or from file in the same directory as the nostr.json

- static/favicon.ico
  - Deleted static favicon file.

- cmd/lerproxy/favicon.ico
  - Added new file for embedded favicon resource.
This commit is contained in:
2025-08-09 08:59:36 +01:00
parent 463bce47b0
commit 8fa3e2ad80
5 changed files with 18 additions and 10 deletions

View File

@@ -5,7 +5,6 @@ package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
"os"
@@ -78,14 +77,6 @@ func main() {
}
var opts []options.O
serveMux := servemux.NewServeMux()
// Add favicon handler
serveMux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/x-icon")
w.Header().Set("Cache-Control", "public, max-age=86400") // Cache for 24 hours
http.ServeFile(w, r, "static/favicon.ico")
})
if server, err = relay.NewServer(
serverParams, serveMux, opts...,
); chk.E(err) {