dotcloud/hipache — pull request #86 by bjyoungblood (2014-03-19 03:42:16+00:00)
Title: Configurable wildcard matching

Currently, the wildcard matching will match some.thing.example.tld to *.example.tld, but not to *.thing.example.tld.

This pull request basically introduces a config option to reverse that, so that people who want to map multiple wildcard subdomains to multiple backends are able to do so.

To configure this, I introduced the greedyWildcard setting under the server config (defaults to true to preserve the old behavior). Setting this to false will cause the domain matching to use indexOf instead of lastIndexOf.