Comparing version 0.0.5 to 0.0.6
@@ -0,1 +1,13 @@ | ||
## 0.0.6 | ||
Enhancement: | ||
- Added support for 1.0.0.0/8 and 2.0.0.0/8 blocks | ||
## 0.0.5 | ||
Enhancement: | ||
- Return the local loop address if no ip is found | ||
## 0.0.4 | ||
@@ -2,0 +14,0 @@ |
@@ -15,5 +15,3 @@ { | ||
"IPV4_EXTERNALLY_NON_ROUTABLE_IP_PREFIX": [ | ||
"0.", | ||
"1.", | ||
"2." | ||
"0." | ||
], | ||
@@ -20,0 +18,0 @@ |
{ | ||
"name": "ipware", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Returns the real IP address of users in Node.js", | ||
@@ -24,3 +24,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"mocha": "~1.3.2" | ||
"mocha": "~2.0.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
@@ -6,4 +6,6 @@ Node IPware | ||
[![build-status-image-travis]][travis] | ||
[![Build Status](https://secure.travis-ci.org/un33k/node-ipware.png?branch=master)](http://travis-ci.org/un33k/node-ipware) | ||
[![Downloads](http://img.shields.io/npm/dm/ipware.svg)](https://npmjs.org/package/ipware) | ||
Overview | ||
@@ -89,4 +91,2 @@ ==================== | ||
"0.", | ||
"1.", | ||
"2." | ||
], | ||
@@ -172,4 +172,1 @@ | ||
Released under a ([BSD](LICENSE.md)) license. | ||
[build-status-image-travis]: https://secure.travis-ci.org/un33k/node-ipware.png?branch=master | ||
[travis]: http://travis-ci.org/un33k/node-ipware?branch=master |
@@ -192,1 +192,21 @@ var get_ip = require('..')().get_ip, | ||
}); | ||
describe('get_ip(): IPV4: Test 1.0.0.0/8 blocks', function() { | ||
it('test_1_0_0_0_block', function() { | ||
var request = {headers: {}}; | ||
request.headers.HTTP_X_REAL_IP = '1.0.0.0'; | ||
get_ip(request); | ||
assert.equal(request.clientIp, '1.0.0.0'); | ||
assert.equal(request.clientIpRoutable, true); | ||
}); | ||
}); | ||
describe('get_ip(): IPV4: Test 2.0.0.0/8 blocks', function() { | ||
it('test_2_0_0_0_block', function() { | ||
var request = {headers: {}}; | ||
request.headers.REMOTE_ADDR = '2.0.0.1'; | ||
get_ip(request); | ||
assert.equal(request.clientIp, '2.0.0.1'); | ||
assert.equal(request.clientIpRoutable, true); | ||
}); | ||
}); |
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
30445
605
170