edwardhotchkiss/subdomain — pull request #9 by jeddawson (2014-07-29 05:52:04+00:00)
Title: Added an option to ignore www subdomains (instead of redirecting)

Added an optional ignoreWWW parameter. When enabled, subdomain will ignore www subdomains without removing them and redirecting.

My use case for this is a web app that dynamically handles customer subdomains and routes www traffic.

Here's an example:

```
app.use(subdomain({base: 'basedomain.tld', ignoreWWW: true}));
app.get('/subdomain/:subdomain/', function(req,res,next){
console.log(req.params.subdomain);
//do something based on the subdomain
next();
});
app.get('/', function(req,res,next){
// either the base domain, or www subdomain
next();
});
```