mongo-throttle
Advanced tools
Comparing version 1.0.4 to 1.0.5
'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 }) |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16209
178