whiskeylover / idreamoftoast

idreamoftoast
Apache License 2.0
1 stars 0 forks source link

Continue development! #4

Closed danriti closed 11 years ago

danriti commented 11 years ago

Tasks to complete:

danriti commented 11 years ago

I just pulled in your changes and have a few questions:

  1. How are you running and testing the application?
  2. I'm getting the following error when I try to view dream.html:
XMLHttpRequest cannot load http://127.0.0.1:5000/dreams/top. Origin null is not allowed by Access-Control-Allow-Origin.
whiskeylover commented 11 years ago

Sorry about the delay in responses, @danriti. I've only been able to work on it on the train on my way to work.

Anyways, for (2) the error you're getting is because of the way the browsers handle cross site scripting. The target server needs to send a header that tells the browser that it's okay to load remote content. I've fixed this by sending HTTP headers along with the JSON strings.

Give it a try now and let me know if you still see the errors.

As for (1), I used python's SimpleHTTPServer to test the application. It also works with local files now. Let me know how it goes.