Hello. I've added a new middleware application to Connect called Domains.
It adds an array of domains to the request object as req.domains.
The first item, req.domains, is the site domain and is determined by the argument passed into the middleware in the use statement, ie .use(connect.domains("example.com") or .use(connect.domains(2)).
All subsequent items are subdomains
I feel like this would be a welcomed addition to Connect.
Added domains middleware - adds heiarchy of domains and subdomains to…
… request object.
req.domains can just be a prototype method, no reason it has to be middleware really, express has req.subdomains for example. Or even if it's middleware we can keep it third-party for now and add it to the wiki
Sounds good. And thanks for the heads up about req.subdomains in express.