Fixed favicon
This commit is contained in:
@@ -43,8 +43,6 @@ func New(provider provider.Provider, db *database.Manager) *Server {
|
||||
Mutex: &sync.Mutex{},
|
||||
}
|
||||
|
||||
s.AddIco()
|
||||
|
||||
return &s
|
||||
}
|
||||
|
||||
@@ -209,16 +207,6 @@ func (s *Server) AppendImagesToBuf(html string) ([]view.Image, error) {
|
||||
return images, nil
|
||||
}
|
||||
|
||||
//go:embed favicon.ico
|
||||
var ico []byte
|
||||
|
||||
func (s *Server) AddIco() {
|
||||
buf := bytes.NewBuffer(ico)
|
||||
s.Mutex.Lock()
|
||||
s.ImageBuffers["favicon.ico"] = buf
|
||||
s.Mutex.Unlock()
|
||||
}
|
||||
|
||||
func addFileToRam(url string) (*bytes.Buffer, error) {
|
||||
// Get the data
|
||||
resp, err := http.Get(url)
|
||||
|
||||
Reference in New Issue
Block a user