favicon

https://github.com/eggjs/egg/blob/master/config/config.default.js#L168
image.png

  1. config.siteFile = {
  2. '/favicon.ico': fs.readFileSync(path.join(__dirname, 'favicon.png')),
  3. };

app/view/index.html

  1. <link rel="icon" href="/public/image/favicons/favicon.ico">
  2. <link rel="stylesheet" href="/public/css/bootstrap.css">
  3. <link rel="apple-touch-icon" href="/public/image/favicons/apple-touch-icon.png" sizes="180x180">
  4. <link rel="icon" href="/public/image/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
  5. <link rel="icon" href="/public/image/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
  6. <link rel="manifest" href="/public/image/favicons/manifest.json">
  7. <link rel="mask-icon" href="/public/image/favicons/safari-pinned-tab.svg" color="#7952b3">
  8. <link rel="icon" href="/public/image/favicons/favicon.ico">

body参数

ctx.request.body