I have to say though, Rails used to be known for "convention over configuration", but when I've tried to use it lately I've found it becomes almost as complicated as configuring enterprise Java projects.
I have to say though, Rails used to be known for "convention over configuration", but when I've tried to use it lately I've found it becomes almost as complicated as configuring enterprise Java projects.
https://github.com/cyu/rack-cors
I used that gem recently, and it fixed my issue. Just added the dev, prod hostnames explicitly in the origins list in my application.rb.
Having run such things on entirely different servers, never mind localhost ports, what I needed to do was set the Access-Control-Allow-Origin http header in the rails controller (same principle applies to other frameworks). One simple guide is here: http://madhukaudantha.blogspot.co.uk/2011/05/access-control-...
Slightly ruined by that dreadful blogger interface, but there you go.
Hopefully it helps you!
>I've found it becomes almost as complicated as configuring enterprise Java projects.
Do you have any specific examples of where you were having troubles?
He's using grunt-connect-proxy to proxy the API requests through the grunt server so there are no CORS requests in this setup.