0.0.3 • Published 12 years ago

jpmobile-ip v0.0.3

Weekly downloads
11
License
-
Repository
github
Last release
12 years ago

jpmobile-ip

Get japanese carrier from ip (Based on jpmobile-ipaddresses rails plugin by jpmobile).

Created for cubie-talk.com, to deal with the situation that Softbank does not allow collections to ports other than 80 from the default Android browser.

Currently supported carriers

Softbank

Installation

npm install jpmobile-ip

Usage

var jpmobile = require('jpmobile-ip');

if (jpmobile.isIpFromCarrier(req.connection.remoteAddress, "softbank")) {
  // Do something..
}

or as Express middleware

app.configure(function() {
  app.use(jpmobile.middleware());
});

app.get("/", function (req, res) {
    console.log(req.carrier);
});
0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago