I have gotten user creation working through postman, but I am getting a CORS error in Ionic:
XMLHttpRequest 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.
auth-service.js:25 data: null
Obviously 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:
I have node server running at localhost:9000 and I have setup a proxy in ionic.project:
{ "name": "myapp", "app_id": "", "proxies": [ { "path": "/api", "proxyUrl": "http://localhost:9000/api" } ] }
I have gotten user creation working through postman, but I am getting a CORS error in Ionic:
XMLHttpRequest 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. auth-service.js:25 data: null
Obviously 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:
Proxy added: /api => http://localhost:9000/api
What else must be done to proxy to my local server?