{
  "name": "canonical-host",
  "version": "0.0.4",
  "description": "Redirect users to the canonical hostname for your site.",
  "main": "canon.js",
  "dependencies": {},
  "devDependencies": {
    "tap": "~0.3.0",
    "request": "~2.10.0"
  },
  "scripts": {
    "test": "tap test/*.js"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/isaacs/canonical-host"
  },
  "keywords": [
    "redirect",
    "canonical",
    "canon",
    "hostname",
    "host",
    "header"
  ],
  "author": {
    "name": "Isaac Z. Schlueter",
    "email": "i@izs.me",
    "url": "http://blog.izs.me/"
  },
  "license": "BSD",
  "readme": "# canonical-host\n\nRedirect users to the canonical hostname for your site.\n\n## Usage\n\n```javascript\nvar canon = require('canonical-host')('my-site.com', 'other-site.com')\n\nhttp.createServer(function (req, res) {\n  // returns 'true' if it's taking over\n  if (!canon(req, res)) return\n\n  // now we know that they're visiting either my-site.com\n  // or other-site.com\n  res.end('Hello from the proper host name!')\n})\n```\n\n## canon(hosts..., [statusCode=301])\n\nPass in the request, the response, 1 or more hostnames to accept,\nand optionally a statusCode to send with the redirect.\n\nIf the host arg has `https://` in front of it, then it will be\nredirected to https if it's not https already.  Likewise if it starts\nwith `http://` and is already https.\n\nReturns a function that takes a req/res pair, and which returns\ntrue if it redirected, false otherwise.\n",
  "readmeFilename": "README.md",
  "_id": "canonical-host@0.0.4",
  "_from": "canonical-host@0"
}
