[Just wanted to capture this somewhere. IIUC, the ability to do this was removed during the last round of commits to the REST code base.]
In a “multi-domain” environment, even with an identical path, we cannot assume that the same resource should be served. For instance, each of these examples should serve a different resource:
http://domain1.com/api (serves API #1)
http://domain2.com/api (serves API #2)
http://domainX.com/api (serves API #3)
Likewise, we may want to retain the option of serving a same given resource from different domains, or different paths:
http://domain1.com/common
http://domain2.com/my/common
http://domainX.com/my/other/common
This flexibility currently does not seem possible.
I provided a working solution previously using the concept of a "mapper", which delegating a mapping of URI -> namespace to the client. However, this added significant (and unnecessary?) complications to the REST code.
Is there a "simpler" way to accomplish the same objective?