Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

[REST] Ability to configure endpoints based on the URI #66

Open
dleangen opened this issue Aug 18, 2016 · 2 comments
Open

[REST] Ability to configure endpoints based on the URI #66

dleangen opened this issue Aug 18, 2016 · 2 comments
Milestone

Comments

@dleangen
Copy link
Contributor

[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?

@pkriens
Copy link
Member

pkriens commented Sep 2, 2016

I won't have time to do this. I also wonder if this should not be better done with a redirect?

@pkriens pkriens added this to the abeyance milestone Sep 2, 2016
@dleangen
Copy link
Contributor Author

dleangen commented Sep 2, 2016

I could imagine this being done with a forward, but a redirect has different semantics.

If you could explain a little more your imagined solution, I could give it a shot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants