UNPKG

whitelistip

Version:

Whitelist middleware for express routing function. When present it allows request comming from the whitelisted IPs only. A 403 Forbidden error is sent to all other IP addresses.

11 lines (9 loc) 285 B
function responseMock () { this.end = function(){return this;}; this.statusCode = null; this.status = function(responseStatus) { this.statusCode = responseStatus; return this; } } function create(options) { return new responseMock(); } module.exports.create = create;