Socket
Socket
Sign inDemoInstall

koa-favicon

Package Overview
Dependencies
5
Maintainers
8
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    koa-favicon

favicon bounce middleware for koa


Version published
Weekly downloads
102K
decreased by-7.6%
Maintainers
8
Install size
59.3 kB
Created
Weekly downloads
 

Readme

Source

koa-favicon Build Status

Koa middleware for serving a favicon. Based on serve-favicon.

Installation

$ npm install koa-favicon

Example

const Koa = require('koa');
const favicon = require('koa-favicon');
const app = new Koa();

app.use(favicon(__dirname + '/public/favicon.ico'));

API

favicon(path, [options])

Returns a middleware serving the favicon found on the given path.

options
  • maxAge cache-control max-age directive in ms, defaulting to 1 day.
  • mime specify the mime-type of the favicon, defaults to "image/x-icon"

License

MIT

Keywords

FAQs

Last updated on 27 Feb 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc