{"action":"created","issue":{"url":"https://api.github.com/repos/diegonetto/generator-ionic/issues/214","labels_url":"https://api.github.com/repos/diegonetto/generator-ionic/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/diegonetto/generator-ionic/issues/214/comments","events_url":"https://api.github.com/repos/diegonetto/generator-ionic/issues/214/events","html_url":"https://github.com/diegonetto/generator-ionic/issues/214","id":90158303,"number":214,"title":"Proxy Support","user":{"login":"tharrington","id":1617488,"avatar_url":"https://avatars.githubusercontent.com/u/1617488?v=3","gravatar_id":"","url":"https://api.github.com/users/tharrington","html_url":"https://github.com/tharrington","followers_url":"https://api.github.com/users/tharrington/followers","following_url":"https://api.github.com/users/tharrington/following{/other_user}","gists_url":"https://api.github.com/users/tharrington/gists{/gist_id}","starred_url":"https://api.github.com/users/tharrington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharrington/subscriptions","organizations_url":"https://api.github.com/users/tharrington/orgs","repos_url":"https://api.github.com/users/tharrington/repos","events_url":"https://api.github.com/users/tharrington/events{/privacy}","received_events_url":"https://api.github.com/users/tharrington/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-22T17:15:47Z","updated_at":"2015-09-04T12:22:04Z","closed_at":null,"body":"I have node server running at localhost:9000 and I have setup a proxy in ionic.project:\r\n\r\n{\r\n  \"name\": \"myapp\",\r\n  \"app_id\": \"\",\r\n  \"proxies\": [\r\n    {\r\n      \"path\": \"/api\",\r\n      \"proxyUrl\": \"http://localhost:9000/api\"\r\n    }\r\n  ]\r\n}\r\n\r\nI have gotten user creation working through postman, but I am getting a CORS error in Ionic:\r\n\r\nXMLHttpRequest cannot load http://localhost:9000/api/users. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. The response had HTTP status code 422.\r\nauth-service.js:25 data: null\r\n\r\nObviously this means that the proxy is not working, but after I run grunt serve I see ionic serve run and the console showing the added proxy:\r\n\r\nProxy added: /api => http://localhost:9000/api\r\n\r\nWhat else must be done to proxy to my local server?"},"comment":{"url":"https://api.github.com/repos/diegonetto/generator-ionic/issues/comments/137721172","html_url":"https://github.com/diegonetto/generator-ionic/issues/214#issuecomment-137721172","issue_url":"https://api.github.com/repos/diegonetto/generator-ionic/issues/214","id":137721172,"user":{"login":"martinbrylski","id":4962398,"avatar_url":"https://avatars.githubusercontent.com/u/4962398?v=3","gravatar_id":"","url":"https://api.github.com/users/martinbrylski","html_url":"https://github.com/martinbrylski","followers_url":"https://api.github.com/users/martinbrylski/followers","following_url":"https://api.github.com/users/martinbrylski/following{/other_user}","gists_url":"https://api.github.com/users/martinbrylski/gists{/gist_id}","starred_url":"https://api.github.com/users/martinbrylski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinbrylski/subscriptions","organizations_url":"https://api.github.com/users/martinbrylski/orgs","repos_url":"https://api.github.com/users/martinbrylski/repos","events_url":"https://api.github.com/users/martinbrylski/events{/privacy}","received_events_url":"https://api.github.com/users/martinbrylski/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T12:22:04Z","updated_at":"2015-09-04T12:22:04Z","body":"Any news on this topic?"}}