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) 179 B
function requestMock () { this.connection = { remoteAddress: null }; } function create(options) { return new requestMock(); } module.exports.create = create;