Permalink
Browse files

Merge pull request #1 from jaclar/strictcheck

Ignore port in host
  • Loading branch information...
gabmontes
gabmontes committed Mar 6, 2013
2 parents e518313 + e21c2da commit 5311786ee349672fb125de9b542db36dab83976e
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/subdomains.js
View
@@ -1,4 +1,3 @@
-
/*!
* express-subdomains
* Copyright(c) Thomas Blobaum
@@ -25,7 +24,7 @@ module.exports = {
forEachAsync(subs, function (fn, item, i, arr) {
var regexp = item.base;
if (regexp !== '.') { regexp = "^" + regexp + "\\."; }
- if (domain) { regexp = regexp + domain + "$"; }
+ if (domain) { regexp = regexp + domain + "(:[0-9]*)?$"; }
if (RegExp(regexp, "gi").test(req.headers.host)) {
if (item.base !== '.') {
if (req.url === '/') {

0 comments on commit 5311786

Please sign in to comment.