From 6a9253bfd66bd0e4c6149120f94bd2a79e42d3c9 Mon Sep 17 00:00:00 2001 From: Roman Landenband Date: Sat, 19 Apr 2014 04:06:55 +0300 Subject: [PATCH] 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. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 7cb2ab6..e699016 100644 --- a/server.js +++ b/server.js @@ -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 -- 2.54.0