1.0.3 • Published 4 years ago
@tycrek/express-nofavicon v1.0.3
NoFavicon
Tiny Express middleware that sends HTTP 204 "No Content" for Favicon requests
Usage
This package is installable from GitHub Packages. To use this package in your project, create an .npmrc file in the same directory as your project's package.json file with these contents:
@tycrek:registry=https://npm.pkg.github.comNow, install with npm i @tycrek/express-nofavicon and use as a middleware:
const nofavicon = require('@tycrek/express-nofavicon');
const express = require('express');
const app = express();
app.use(nofavicon);What is it doing?
If the request URL (req.url) matches (using regex test) /favicon.ico, the response will be HTTP 204 No Content.
1.0.3
4 years ago