Closed johnmosesman closed 9 years ago
This is by design. But, we should have a flag to push that path through to your API as well. Basically the proxy-pass chops off the API_PREFIX_PATH
when it goes to the actual API. But, yeah, we should fix this so it works.
Hey Tony,
I'm not sure what you mean. If the proxy removes the prefix path, where does the prefix path get used?
The API_PREFIX_PATH
is probably a bad name... looking at refactoring that.
Basically, it is the path that is proxy_pass
'ed to the API_URL
, so, requests from the Ember app to http://<YOUR_HEROKU_EMBER_CLI_APP_HOSTNAME>/api/v1/ping
become http://<API_URL>/v1/ping
...
Now, you could set API_URL
to anything you want, if you wish to keep the /api
prefix, for instance, setting API_URL
to http://example.com/api/
would have requests to http://<YOUR_HEROKU_EMBER_CLI_APP_HOSTNAME>/api/v1/ping
become http://example.com/api/v1/ping
. Hope that helps.
Reference: #62
Hi,
I have two Heroku apps (Ember CLI & Rails), and it appears from the logs that the Ember app is sending the correct request
/api/categories
, but the Rails Heroku app is receiving the request without the/api/
prefix.Here are the Ember logs (you can see the
GET /api/categories
on the second to last line):And the Rails logs:
This is my config for the Ember app:
Ember -
time-keeper-ember.herokuapp.com
Rails -time-keeper.herokuapp.com
When I run my Ember app locally and proxy to the production Rails app (
ember serve --proxy https://time-keeper.herokuapp.com
), it works fine, so I believe the problem is between the two Heroku apps themselves.I saw this closed issue, but it appears to be a different problem from the one I'm having.
Any ideas if this could be from the buildpack? If I didn't supply enough or the right kind of information let me know. Thank you so much for this buildpack—it is amazing. This is my final hurdle. :/