View Full Version : how to connect to heroku?

9 May 2012, 10:29 AM
Hi I'm having an issue connecting to heroku. When I set my store proxy type as ajax and include the headers: { 'Content-type': 'application/json',
'accept': 'application/json'
I get OPTIONS myurl 405 (Method Not Allowed) and XMLHttpRequest cannot load myurl. Origin http://localhost:8080 (http://localhost/) is not allowed by Access-Control-Allow-Origin.

if i change the type to jsonp and create a callback i get Resource interpreted as Script but transferred with MIME type text/html: and Uncaught SyntaxError: Unexpected token < which points to <!DOCTYPEhtml>

I forgot to mention. The code I have works fine in sencha architect 2.

15 May 2012, 7:54 AM
Are you trying to connect from local PC to heroku? You will need to use JSONP for cross domain.