Socket
Socket
Sign inDemoInstall

serve-favicon

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serve-favicon - npm Package Compare versions

Comparing version 2.4.5 to 2.5.0

8

HISTORY.md

@@ -0,1 +1,9 @@

2.5.0 / 2018-03-29
==================
* Ignore requests without `url` property
* deps: ms@2.1.1
- Add `week`
- Add `w`
2.4.5 / 2017-09-26

@@ -2,0 +10,0 @@ ==================

17

index.js

@@ -67,3 +67,3 @@ /*!

return function favicon (req, res, next) {
if (parseUrl(req).pathname !== '/favicon.ico') {
if (getPathname(req) !== '/favicon.ico') {
next()

@@ -149,2 +149,17 @@ return

/**
* Get the request pathname.
*
* @param {object} req
* @return {string}
*/
function getPathname (req) {
try {
return parseUrl(req).pathname
} catch (e) {
return undefined
}
}
/**
* Determine if the cached representation is fresh.

@@ -151,0 +166,0 @@ *

14

package.json
{
"name": "serve-favicon",
"description": "favicon serving middleware with caching",
"version": "2.4.5",
"version": "2.5.0",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",

@@ -16,3 +16,3 @@ "license": "MIT",

"fresh": "0.5.2",
"ms": "2.0.0",
"ms": "2.1.1",
"parseurl": "~1.3.2",

@@ -22,8 +22,8 @@ "safe-buffer": "5.1.1"

"devDependencies": {
"eslint": "3.19.0",
"eslint-config-standard": "10.2.1",
"eslint-plugin-import": "2.7.0",
"eslint": "4.19.1",
"eslint-config-standard": "11.0.0",
"eslint-plugin-import": "2.9.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "5.1.1",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-node": "6.0.1",
"eslint-plugin-promise": "3.7.0",
"eslint-plugin-standard": "3.0.1",

@@ -30,0 +30,0 @@ "istanbul": "0.4.5",

@@ -8,3 +8,2 @@ # serve-favicon

[![Test Coverage][coveralls-image]][coveralls-url]
[![Gratipay][gratipay-image]][gratipay-url]

@@ -139,3 +138,1 @@ Node.js middleware for serving a favicon.

[downloads-url]: https://npmjs.org/package/serve-favicon
[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
[gratipay-url]: https://www.gratipay.com/dougwilson/
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc