Fix favicon logic to correctly check for file read errors

- cmd/lerproxy/main.go
  - Updated condition to properly handle favicon file read errors.
This commit is contained in:
2025-08-09 09:20:02 +01:00
parent f8c30e2213
commit 2148c597aa

View File

@@ -328,7 +328,7 @@ func setProxy(mapping map[string]string) (h http.Handler, err error) {
)
fin := hn + "/favicon.ico"
var fi []byte
if fi, err = os.ReadFile(fin); !chk.E(err) {
if fi, err = os.ReadFile(fin); chk.E(err) {
fi = defaultFavicon
}
log.I.S(fi)