Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongo-throttle

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-throttle - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

6

lib/throttler.js
'use strict'
var ipRegex = require('ip-regex')
var mongoose = require('mongoose')
var defaultsDeep = require('lodash.defaultsdeep')
var pkg = require('../package')
var defaults = require('../defaults')

@@ -90,6 +88,2 @@ var throttleModel = require('../models/throttle')

if (!mongoose.connection.readyState) {
console.warn('MongoDB connection not set. Skipping ' + pkg.name)
return next()
}
Throttle

@@ -96,0 +90,0 @@ .findOneAndUpdate({ip: ip}, { $inc: { hits: 1 } }, { upsert: false })

2

package.json
{
"name": "mongo-throttle",
"version": "1.0.4",
"version": "1.0.5",
"description": "Basic IP rate-limiting middleware for Express stored in mongoDB. Use to throttle or limit incoming request rate.",

@@ -5,0 +5,0 @@ "main": "lib/throttler.js",

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