Fix bad matching against subdomain regex

This pattern will match against any (domain).com, instead it should extract (subdomain).domain.com, the change fixes this.
This commit is contained in:
Roman Landenband
2014-04-19 04:06:55 +03:00
parent dd6d04c2cf
commit 6a9253bfd6
+1 -1
View File
@@ -33,7 +33,7 @@ function maybe_bounce(req, res, bounce) {
}
// extract the subdomain, which is the client id
var match = hostname.match(/^([a-z0-9]+)[.].*/);
var match = hostname.match(/^([a-z0-9]+)[.].*[.].*/);
// not for a specific client
// pass on to regular server