I believe the added algorithm at line 16 would allow for "*.mydomain.com" routes to be matched by "www.mydomain.com", "foobar.mydomain.com", etc.
Update /bin/bouncy.js to support wildcard characters (*) for sub-doma…
I bet there is a wildcard module somewhere that has a more robust and well-tested recursive algorithm for this. Or perhaps fall into regex mode if the first and last characters in the key are '/'.
Could maybe do both. A regex syntax would be great for real advanced pattern matching. While a simple wildcard syntax would be great too for the regular matching.
I've tested the changes with ".mydomain.com". It matches "www.mydomain.com" and "www.shop.mydomain.com". I've also tried ".shop.mydomain.com" which matches "www.shop.mydomain.com" and "www.my.shop.mydomain.com", but not "www.mydomain.com". You should try it out as well.
This would be a nice feature! Like I have it go to my WordPress Network install, so for each new subdomain, I have to add to the routes.json file.
I think isaacs minimatch module would be a good fit for this