airbnb/rendr — pull request #214 by smclelland (2013-12-06 22:53:28+00:00)
Title: Custom apiProxy server option

I have a situation where I don't need the apiProxy. Calls go directly to an endpoint on the same server. This change seemed like the most painless way of making that happen.

To get it working with no proxy, I did the following:

1) Name the entries in dataAdapterConfig the version of the API "v1": {...}

2) Override syncer.formatClientUrl in the Base Model/Collection to skip adding the /-/ separator, otherwise identical.

3) Set config.apiProxy to noop

result is /api/v1/myresource -> app server = ok!

I could see the no-proxy being an option that does all of this. It prevents the middleware from hooking on and eliminates the addition of the separator.