Skip to content
Browse files

Ignore port in host

  • Loading branch information...
1 parent e518313 commit e21c2da7f9fed98f407897042d16cac2109667e8 @jaclar jaclar committed Mar 6, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/subdomains.js
View
3 lib/subdomains.js
@@ -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 e21c2da

Please sign in to comment.
Something went wrong with that request. Please try again.