The question about koa-favicon

A server built with koa2 wants to use koa-faivcon to load page logo, but it doesn"t work. Does this middleware depend on anything else?

< hr >
  • Project directory is as follows:

  • reference code is as follows:
app.use(favicon(resolve("./public/favicon.ico")))
Mar.02,2021

1. It's not koa-faivcon , it's koa-favicon .
2. It should be OK if the path is handled correctly, but the cache of favicon is particularly strong. Sometimes privacy mode and clear cache are useless. Try downloading another browser.

Menu