https://github.com/jsumners/fastify-no-icon
https://github.com/jsumners/fastify-no-icon
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jsumners/fastify-no-icon
- Owner: jsumners
- Created: 2017-11-30T23:33:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-01T09:53:29.000Z (over 2 years ago)
- Last Synced: 2024-05-01T23:13:10.943Z (12 months ago)
- Language: JavaScript
- Size: 50.8 KB
- Stars: 12
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
- awesome-fastify - `fastify-no-icon`
README
# fastify-no-icon
This is a simple plugin for Fastify to deal with annoying `/favicon.ico`
requests. Under normal operation Fastify will throw an error because a route
isn't registered to handle the request. This plugin merely gives it one.## Example
```js
const fastify = require('fastify')()
fastify.register(require('fastify-no-icon'))
fastify.listen({
port: 3000
})
// curl 127.0.0.1:3000/favicon.ico => empty 404 and no thrown error
```## License
[MIT License](http://jsumners.mit-license.org/)