Skip to content

Commit

Permalink
handle favicon loading err
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory Chen committed May 25, 2020
1 parent a3674f2 commit 9fea957
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/espresso/grpc_web.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ func (s *GRPCWebServer) Listen(listener net.Listener, enableDevLogger bool) erro
}

faviconBytes, err := box.Find("favicon.ico")
if err != nil {
return errors.Wrap(err, "loading favicon.ico")
}
router.Get("/favicon.ico", func(writer http.ResponseWriter, request *http.Request) {
writer.WriteHeader(200)
writer.Write(faviconBytes)
Expand Down

0 comments on commit 9fea957

Please sign in to comment.