Ember with rails API production problem

Hi. Im trying to deploy first ember app with api. My backend is ror with open api. Everytng works great in develop with


ember serve --proxy "http://192.168.0.165:9001"

but when i try switch to production

.ember-cli

{
  "disableAnalytics": false,
  "proxy":"http://192.168.0.165:9001",
  "liveReload": true,
  "watcher": "polling"
}

ember build

nginx

server {
listen 9000;
 root  /home/alice/ember/front/dist/;
}

my ember app works but dosnt see any data from api

what have i done wrong?

Could you specify configuration of your rails api? What port it uses? Do you use upstream in nginx for rails?

Also proxyfying doesn’t work after build as it a cli settings, not the code itself. As I understand now your ember-data model tries to reach %same_url%/data_url instead of 192.168.0.165. You could see it in the network console.

using rack -cors gem was a solution for me